[jira] Commented: (DIRMINA-120) Callbacks for IoFutures
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > [jira] Commented: (DIRMINA-120) Callbacks for IoFutures




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Commented: (DIRMINA-120) Callbacks for IoFutures  
Trustin Lee (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-13-05 10:45 PM

[ http://issues.apache.org/jira/brows...23575
50 ]

Trustin Lee commented on DIRMINA-120:
-------------------------------------

I thought over your opinion and found the simpler way:

http://svn.apache.org/viewcvs/direc...43990&view=diff

If we're going to downcast, why not downcasting IoFuture itself like this?

ConnectFuture future = ...;

future.setCallback( new Iofuture.Callback() {
public void operationComplete( IoFuture future ) {
ConnectFuture cf = ( ConnectFuture ) future;
try {
IoSession session = cf.getSession();
} ...
}
});

> Callbacks for IoFutures
> -----------------------
>
>          Key: DIRMINA-120
>          URL: http://issues.apache.org/jira/browse/DIRMINA-120
>      Project: Directory MINA
>         Type: Improvement
>     Reporter: Trustin Lee
>     Assignee: Trustin Lee
>      Fix For: 0.9
>  Attachments: ConnectFuture.java, IoFuture.java
>
> IoFuture provides only blocking-way ('join' method) for user to find out t
he result of an I/O request.  It would be great if users can specify a callb
ack:
> ConnectFuture future = connector.connect(...);
> future.setCallback( new ConnectFuture.Callback() {
>     public void connectionEstablished( IoSession session ) {
>     }
>     public void connectionFailed( Throwable cause ) {
>     }
> } );
> There can be a race condition if the connection process ends before a user calls s
etCallback() method, but we can resolve this carefully so users don't notice any iss
ue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira







[ Post a follow-up to this message ]



    RE: [jira] Commented: (DIRMINA-120) Callbacks for IoFutures  
Irving, Dave


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-14-05 12:45 PM

Hi Trustin,

Yeah - that looks great. It keeps the flexibility, whilst removing the
extra complexity from the actual IoFuture implementations! Thanks!

Dave

-----Original Message-----
From: Trustin Lee (JIRA) [mailto:jira-1oDqGaOF3Lkdnm+yROfE0A@public.gman
e.org]=20
Sent: 13 November 2005 22:34
To: dev-aYN4UCa7k1r1N9kud6OZbmD2FQJk+8+b@public.gmane.org
Subject: [jira] Commented: (DIRMINA-120) Callbacks for IoFutures

[
http://issues.apache.org/jira/brows...ments#action_12
357550 ]=20

Trustin Lee commented on DIRMINA-120:
-------------------------------------

I thought over your opinion and found the simpler way:

http://svn.apache.org/viewcvs/direc.../java/org/apach
e/mina/common/IoFuture.java?rev=3D343990&r1=3D343989&r2=3D343990&view=3Ddiff

If we're going to downcast, why not downcasting IoFuture itself like
this?

ConnectFuture future =3D ...;

future.setCallback( new Iofuture.Callback() {
public void operationComplete( IoFuture future ) {
ConnectFuture cf =3D ( ConnectFuture ) future;
try {
IoSession session =3D cf.getSession();
} ...
}
});

> Callbacks for IoFutures
> -----------------------
>
>          Key: DIRMINA-120
>          URL: http://issues.apache.org/jira/browse/DIRMINA-120
>      Project: Directory MINA
>         Type: Improvement
>     Reporter: Trustin Lee
>     Assignee: Trustin Lee
>      Fix For: 0.9
>  Attachments: ConnectFuture.java, IoFuture.java
>
> IoFuture provides only blocking-way ('join' method) for user to find
out the result of an I/O request.  It would be great if users can
specify a callback:
> ConnectFuture future =3D connector.connect(...); future.setCallback( new

> ConnectFuture.Callback() {
>     public void connectionEstablished( IoSession session ) {
>     }
>     public void connectionFailed( Throwable cause ) {
>     }
> } );
> There can be a race condition if the connection process ends before a
user calls setCallback() method, but we can resolve this carefully so
users don't notice any issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira



This e-mail and any attachment is for authorised use by the intended recipi=
ent(s) only. It may contain proprietary material, confidential information =
and/or be subject to legal privilege. It should not be copied, disclosed to=
, retained or used by, any other party. If you are not an intended recipien=
t then please promptly delete this e-mail and any attachment and all copies=
and inform the sender. Thank you.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:46 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register