org.apache.mina.common
Class CloseFuture

java.lang.Object
  extended by org.apache.mina.common.IoFuture
      extended by 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)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.mina.common.IoFuture
IoFuture.Callback
 
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 org.apache.mina.common.IoFuture
getCallback, getLock, getValue, isReady, join, join, setCallback, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseFuture

public CloseFuture()
Creates a new instance.


CloseFuture

public CloseFuture(Object lock)
Creates a new instance which uses the specified object as a lock.

Method Detail

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.