Package org.apache.hc.core5.reactor
Class IOSessionRequest
- java.lang.Object
-
- org.apache.hc.core5.reactor.IOSessionRequest
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Objectattachmentprivate java.util.concurrent.atomic.AtomicReference<ModalCloseable>closeableRef(package private) BasicFuture<IOSession>future(package private) java.net.SocketAddresslocalAddress(package private) java.net.SocketAddressremoteAddress(package private) NamedEndpointremoteEndpoint(package private) Timeouttimeout
-
Constructor Summary
Constructors Constructor Description IOSessionRequest(NamedEndpoint remoteEndpoint, java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, Timeout timeout, java.lang.Object attachment, FutureCallback<IOSession> callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(ModalCloseable closeable)booleancancel()booleancancel(boolean mayInterruptIfRunning)voidcompleted(ProtocolIOSession ioSession)voidfailed(java.lang.Exception cause)IOSessionget()IOSessionget(long timeout, java.util.concurrent.TimeUnit unit)booleanisCancelled()booleanisDone()java.lang.StringtoString()
-
-
-
Field Detail
-
remoteEndpoint
final NamedEndpoint remoteEndpoint
-
remoteAddress
final java.net.SocketAddress remoteAddress
-
localAddress
final java.net.SocketAddress localAddress
-
timeout
final Timeout timeout
-
attachment
final java.lang.Object attachment
-
future
final BasicFuture<IOSession> future
-
closeableRef
private final java.util.concurrent.atomic.AtomicReference<ModalCloseable> closeableRef
-
-
Constructor Detail
-
IOSessionRequest
public IOSessionRequest(NamedEndpoint remoteEndpoint, java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, Timeout timeout, java.lang.Object attachment, FutureCallback<IOSession> callback)
-
-
Method Detail
-
completed
public void completed(ProtocolIOSession ioSession)
-
failed
public void failed(java.lang.Exception cause)
-
cancel
public boolean cancel()
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancelin interfacejava.util.concurrent.Future<IOSession>
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfacejava.util.concurrent.Future<IOSession>
-
assign
public void assign(ModalCloseable closeable)
-
isDone
public boolean isDone()
- Specified by:
isDonein interfacejava.util.concurrent.Future<IOSession>
-
get
public IOSession get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Specified by:
getin interfacejava.util.concurrent.Future<IOSession>- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
get
public IOSession get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
- Specified by:
getin interfacejava.util.concurrent.Future<IOSession>- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-