Issue Details (XML | Word | Printable)

Key: DIRMINA-120
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Trustin Lee
Reporter: Trustin Lee
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

Callbacks for IoFutures

Created: 12/Nov/05 08:33 AM   Updated: 14/Nov/05 06:37 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.9.0

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ConnectFuture.java 2005-11-12 07:35 PM dave irving 4 kB
Java Source File Licensed for inclusion in ASF works IoFuture.java 2005-11-12 07:34 PM dave irving 4 kB

Resolution Date: 14/Nov/05 06:37 PM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
dave irving made changes - 12/Nov/05 07:34 PM
Field Original Value New Value
Attachment IoFuture.java [ 12320656 ]
dave irving made changes - 12/Nov/05 07:35 PM
Attachment ConnectFuture.java [ 12320657 ]
Trustin Lee made changes - 13/Nov/05 01:26 PM
Status Open [ 1 ] In Progress [ 3 ]
Trustin Lee made changes - 14/Nov/05 06:37 PM
Status In Progress [ 3 ] Closed [ 6 ]
Resolution Fixed [ 1 ]