|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectFuture
An IoFuture for asynchronous connect requests.
IoConnector connector = ...; ConnectFuture future = connector.connect(...); future.join(); // Wait until the connection attempt is finished. IoSession session = future.getSession(); session.write(...);
| Method Summary | |
|---|---|
IoSession |
getSession()
Returns IoSession which is the result of connect operation. |
boolean |
isConnected()
Returns true if the connect operation is finished successfully. |
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 interface org.apache.mina.common.IoFuture |
|---|
addListener, getLock, isReady, join, join, removeListener |
| Method Detail |
|---|
IoSession getSession()
throws RuntimeIOException
IoSession which is the result of connect operation.
getSession in interface IoFutureRuntimeIOException - if connection attempt failed by an exceptionboolean isConnected()
void setSession(IoSession session)
void setException(Throwable exception)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||