directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irving, Dave" <>
Subject RE: [jira] Commented: (DIRMINA-120) Callbacks for IoFutures
Date Mon, 14 Nov 2005 08:54:15 GMT
Hi Trustin,

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


-----Original Message-----
From: Trustin Lee (JIRA) [] 
Sent: 13 November 2005 22:34
Subject: [jira] Commented: (DIRMINA-120) Callbacks for IoFutures

357550 ] 

Trustin Lee commented on DIRMINA-120:

I thought over your opinion and found the simpler way:

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

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:
>      Project: Directory MINA
>         Type: Improvement
>     Reporter: Trustin Lee
>     Assignee: Trustin Lee
>      Fix For: 0.9
>  Attachments:,
> 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 = 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:
For more information on JIRA, see:

This e-mail and any attachment is for authorised use by the intended recipient(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 recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

View raw message