org.apache.mina.common.support

Class DefaultCloseFuture

Implemented Interfaces:
CloseFuture, IoFuture

public class DefaultCloseFuture
extends DefaultIoFuture
implements CloseFuture

A default implementation of CloseFuture.

Constructor Summary

DefaultCloseFuture(IoSession session)
Creates a new instance.
DefaultCloseFuture(IoSession session, 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()
Marks this future as closed and notifies all threads waiting for this future.

Methods inherited from class org.apache.mina.common.support.DefaultIoFuture

addListener, getLock, getSession, getValue, isReady, join, join, removeListener, setValue

Constructor Details

DefaultCloseFuture

public DefaultCloseFuture(IoSession session)
Creates a new instance.

DefaultCloseFuture

public DefaultCloseFuture(IoSession session,
                          Object lock)
Creates a new instance which uses the specified object as a lock.

Method Details

isClosed

public boolean isClosed()
Returns true if the close request is finished and the session is closed.
Specified by:
isClosed in interface CloseFuture

setClosed

public void setClosed()
Marks this future as closed and notifies all threads waiting for this future. This method is invoked by MINA internally. Please do not call this method directly.
Specified by:
setClosed in interface CloseFuture