org.apache.mina.common
Interface IoFuture

All Known Subinterfaces:
CloseFuture, ConnectFuture, ReadFuture, WriteFuture
All Known Implementing Classes:
AbstractIoAcceptor.AcceptorOperationFuture, AbstractIoService.ServiceOperationFuture, AbstractPollingIoConnector.ConnectionRequest, CompositeIoFuture, DefaultCloseFuture, DefaultConnectFuture, DefaultIoFuture, DefaultReadFuture, DefaultWriteFuture

public interface IoFuture

Represents the result of an ashynchronous I/O operation.

Version:
$Rev: 588579 $, $Date: 2007-10-26 11:21:01 +0200 (Fri, 26 Oct 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Method Summary
 IoFuture addListener(IoFutureListener<?> listener)
          Adds an event listener which is notified when the state of this future changes.
 IoFuture await()
          Wait for the asynchronous operation to end.
 boolean await(long timeoutMillis)
          Wait for the asynchronous operation to end with the specified timeout.
 boolean await(long timeout, TimeUnit unit)
          Wait for the asynchronous operation to end with the specified timeout.
 IoFuture awaitUninterruptibly()
          Wait for the asynchronous operation to end uninterruptibly.
 boolean awaitUninterruptibly(long timeoutMillis)
          Wait for the asynchronous operation to end with the specified timeout uninterruptibly.
 boolean awaitUninterruptibly(long timeout, TimeUnit unit)
          Wait for the asynchronous operation to end with the specified timeout uninterruptibly.
 IoSession getSession()
          Returns the IoSession which is associated with this future.
 boolean isReady()
          Returns if the asynchronous operation is finished.
 void join()
          Deprecated. Replaced with awaitUninterruptibly().
 boolean join(long timeoutMillis)
          Deprecated. Replaced with awaitUninterruptibly(long).
 IoFuture removeListener(IoFutureListener<?> listener)
          Removes an existing event listener which is notified when the state of this future changes.
 

Method Detail

getSession

IoSession getSession()
Returns the IoSession which is associated with this future.


await

IoFuture await()
               throws InterruptedException
Wait for the asynchronous operation to end.

Throws:
InterruptedException

await

boolean await(long timeout,
              TimeUnit unit)
              throws InterruptedException
Wait for the asynchronous operation to end with the specified timeout.

Returns:
true if the operation is finished.
Throws:
InterruptedException

await

boolean await(long timeoutMillis)
              throws InterruptedException
Wait for the asynchronous operation to end with the specified timeout.

Returns:
true if the operation is finished.
Throws:
InterruptedException

awaitUninterruptibly

IoFuture awaitUninterruptibly()
Wait for the asynchronous operation to end uninterruptibly.


awaitUninterruptibly

boolean awaitUninterruptibly(long timeout,
                             TimeUnit unit)
Wait for the asynchronous operation to end with the specified timeout uninterruptibly.

Returns:
true if the operation is finished.

awaitUninterruptibly

boolean awaitUninterruptibly(long timeoutMillis)
Wait for the asynchronous operation to end with the specified timeout uninterruptibly.

Returns:
true if the operation is finished.

join

@Deprecated
void join()
Deprecated. Replaced with awaitUninterruptibly().


join

@Deprecated
boolean join(long timeoutMillis)
Deprecated. Replaced with awaitUninterruptibly(long).


isReady

boolean isReady()
Returns if the asynchronous operation is finished.


addListener

IoFuture addListener(IoFutureListener<?> listener)
Adds an event listener which is notified when the state of this future changes.


removeListener

IoFuture removeListener(IoFutureListener<?> listener)
Removes an existing event listener which is notified when the state of this future changes.



Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.