Package org.apache.mina.core.polling
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>
public final class AbstractPollingIoConnector.ConnectionRequest extends DefaultConnectFuture
A ConnectionRequest's Iouture
-
-
Constructor Summary
Constructors Constructor Description ConnectionRequest(H handle, IoSessionInitializer<? extends ConnectFuture> callback)
Creates a new ConnectionRequest instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel()
Cancels the connection attempt and notifies all threads waiting for this future.long
getDeadline()
H
getHandle()
IoSessionInitializer<? extends ConnectFuture>
getSessionInitializer()
-
Methods inherited from class org.apache.mina.core.future.DefaultConnectFuture
addListener, await, awaitUninterruptibly, getException, getSession, isCanceled, isConnected, newFailedFuture, removeListener, setException, setSession
-
Methods inherited from class org.apache.mina.core.future.DefaultIoFuture
await, await, awaitUninterruptibly, awaitUninterruptibly, getValue, isDone, join, join, setValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.mina.core.future.IoFuture
await, await, awaitUninterruptibly, awaitUninterruptibly, isDone, join, join
-
-
-
-
Constructor Detail
-
ConnectionRequest
public ConnectionRequest(H handle, IoSessionInitializer<? extends ConnectFuture> callback)
Creates a new ConnectionRequest instance- Parameters:
handle
- The IoHandercallback
- The IoFuture callback
-
-
Method Detail
-
getHandle
public H getHandle()
- Returns:
- The IoHandler instance
-
getDeadline
public long getDeadline()
- Returns:
- The connection deadline
-
getSessionInitializer
public IoSessionInitializer<? extends ConnectFuture> getSessionInitializer()
- Returns:
- The session initializer callback
-
cancel
public boolean cancel()
Cancels the connection attempt and notifies all threads waiting for this future.- Specified by:
cancel
in interfaceConnectFuture
- Overrides:
cancel
in classDefaultConnectFuture
- Returns:
true
if the future has been cancelled by this call,false
if the future was already cancelled.
-
-