Package org.apache.hc.client5.http.nio
Interface ManagedAsyncClientConnection
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,org.apache.hc.core5.http.HttpConnection,org.apache.hc.core5.io.ModalCloseable,org.apache.hc.core5.http.SocketModalCloseable,org.apache.hc.core5.reactor.ssl.TransportSecurityLayer
- All Known Implementing Classes:
DefaultManagedAsyncClientConnection
@Internal public interface ManagedAsyncClientConnection extends org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.reactor.ssl.TransportSecurityLayerRepresents a managed asynchronous connection whose state and life cycle is managed by a connection manager.- Since:
- 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidactivate()Restores the connection from idle mode.voidpassivate()Puts the connection into idle mode.voidsubmitCommand(org.apache.hc.core5.reactor.Command command, org.apache.hc.core5.reactor.Command.Priority priority)Submits the given command for execution.default voidswitchProtocol(java.lang.String protocolId, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> callback)Switches this I/O session to the application protocol with the given ID.-
Methods inherited from interface org.apache.hc.core5.http.HttpConnection
close, getEndpointDetails, getLocalAddress, getProtocolVersion, getRemoteAddress, getSSLSession, isOpen
-
-
-
-
Method Detail
-
submitCommand
void submitCommand(org.apache.hc.core5.reactor.Command command, org.apache.hc.core5.reactor.Command.Priority priority)Submits the given command for execution.- Parameters:
command- the command to be executed.priority- the command priority.
-
passivate
void passivate()
Puts the connection into idle mode.
-
activate
void activate()
Restores the connection from idle mode.
-
switchProtocol
default void switchProtocol(java.lang.String protocolId, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> callback) throws java.lang.UnsupportedOperationExceptionSwitches this I/O session to the application protocol with the given ID.- Parameters:
protocolId- the application protocol IDcallback- the result callback- Throws:
java.lang.UnsupportedOperationException- if application protocol switch is not supported.- Since:
- 5.2
-
-