org.apache.mina.common
Class CloseFuture
java.lang.Object
org.apache.mina.common.IoFuture
org.apache.mina.common.CloseFuture
public class CloseFuture
- extends IoFuture
An IoFuture
for asynchronous close requests.
Example
IoSession session = ...;
CloseFuture future = session.close();
// Wait until the connection is closed
future.join();
// Now connection should be closed.
assert future.isClosed();
- Version:
- $Rev: 389042 $, $Date: 2006-03-27 16:49:41 +0900 (Mon, 27 Mar 2006) $
- Author:
- The Apache Directory Project (mina-dev@directory.apache.org)
Constructor Summary |
CloseFuture()
Creates a new instance. |
CloseFuture(Object lock)
Creates a new instance which uses the specified object as a lock. |
Method Summary |
boolean |
isClosed()
Returns true if the close request is finished and the session is closed. |
void |
setClosed()
This method is invoked by MINA internally. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CloseFuture
public CloseFuture()
- Creates a new instance.
CloseFuture
public CloseFuture(Object lock)
- Creates a new instance which uses the specified object as a lock.
isClosed
public boolean isClosed()
- Returns true if the close request is finished and the session is closed.
setClosed
public void setClosed()
- This method is invoked by MINA internally. Please do not call this method
directly.