Class AbstractPollingIoConnector.ConnectionRequest
java.lang.Object
org.apache.mina.core.future.DefaultIoFuture
org.apache.mina.core.future.DefaultConnectFuture
org.apache.mina.core.polling.AbstractPollingIoConnector.ConnectionRequest
- All Implemented Interfaces:
ConnectFuture, IoFuture
- Enclosing class:
AbstractPollingIoConnector<S extends AbstractIoSession, H>
A ConnectionRequest's Iouture
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe time up to this connection request will be validprivate final HThe handle associated with this connection requestprivate final IoSessionInitializer<? extends ConnectFuture> The callback to call when the session is initialized -
Constructor Summary
ConstructorsConstructorDescriptionConnectionRequest(H handle, IoSessionInitializer<? extends ConnectFuture> callback) Creates a new ConnectionRequest instance -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel()Cancels the connection attempt and notifies all threads waiting for this future.longIoSessionInitializer<? extends ConnectFuture> Methods inherited from class DefaultConnectFuture
addListener, await, awaitUninterruptibly, getException, getSession, isCanceled, isConnected, newFailedFuture, removeListener, setException, setSessionMethods inherited from class DefaultIoFuture
await, await, awaitUninterruptibly, awaitUninterruptibly, getValue, isDone, join, join, setValueMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IoFuture
await, await, awaitUninterruptibly, awaitUninterruptibly, isDone, join, join
-
Field Details
-
handle
The handle associated with this connection request -
deadline
private final long deadlineThe time up to this connection request will be valid -
sessionInitializer
The callback to call when the session is initialized
-
-
Constructor Details
-
ConnectionRequest
Creates a new ConnectionRequest instance- Parameters:
handle- The IoHandercallback- The IoFuture callback
-
-
Method Details
-
getHandle
- Returns:
- The IoHandler instance
-
getDeadline
public long getDeadline()- Returns:
- The connection deadline
-
getSessionInitializer
- Returns:
- The session initializer callback
-
cancel
public boolean cancel()Cancels the connection attempt and notifies all threads waiting for this future.- Specified by:
cancelin interfaceConnectFuture- Overrides:
cancelin classDefaultConnectFuture- Returns:
trueif the future has been cancelled by this call,falseif the future was already cancelled.
-