|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.mina.common.support.DefaultIoFuture
org.littleshoot.mina.common.support.DefaultConnectFuture
public class DefaultConnectFuture
A default implementation of ConnectFuture.
| Constructor Summary | |
|---|---|
DefaultConnectFuture()
Creates a new instance. |
|
DefaultConnectFuture(Object lock)
Creates a new instance which uses the specified object as a lock. |
|
| Method Summary | |
|---|---|
IoSession |
getSession()
Returns the IoSession which is associated with this future. |
boolean |
isConnected()
Returns true if the connect operation is finished successfully. |
static ConnectFuture |
newFailedFuture(Throwable exception)
Returns a new ConnectFuture which is already marked as 'failed to connect'. |
void |
setException(Throwable exception)
Sets the exception caught due to connection failure and notifies all threads waiting for this future. |
void |
setSession(IoSession session)
Sets the newly connected session and notifies all threads waiting for this future. |
| Methods inherited from class org.littleshoot.mina.common.support.DefaultIoFuture |
|---|
addListener, getLock, getValue, isReady, join, join, removeListener, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.littleshoot.mina.common.IoFuture |
|---|
addListener, getLock, isReady, join, join, removeListener |
| Constructor Detail |
|---|
public DefaultConnectFuture()
public DefaultConnectFuture(Object lock)
| Method Detail |
|---|
public static ConnectFuture newFailedFuture(Throwable exception)
ConnectFuture which is already marked as 'failed to connect'.
public IoSession getSession()
throws RuntimeIOException
IoFutureIoSession which is associated with this future.
getSession in interface ConnectFuturegetSession in interface IoFuturegetSession in class DefaultIoFutureRuntimeIOException - if connection attempt failed by an exceptionpublic boolean isConnected()
ConnectFuture
isConnected in interface ConnectFuturepublic void setSession(IoSession session)
ConnectFuture
setSession in interface ConnectFuturepublic void setException(Throwable exception)
ConnectFuture
setException in interface ConnectFuture
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||