Top Description Methods
org.apache.hc.client5.http.nio

public Interface ManagedAsyncClientConnection

extends HttpConnection, TransportSecurityLayer
Known Direct Implementers
org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection
Annotations
@Internal
Imports
org.apache.hc.core5.annotation.Internal, org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.reactor.Command, .ProtocolIOSession, org.apache.hc.core5.reactor.ssl.TransportSecurityLayer

Represents a managed asynchronous connection whose state and life cycle is managed by a connection manager.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public void
activate()

Restores the connection from idle mode.

public void
passivate()

Puts the connection into idle mode.

public void
submitCommand(Command
the command to be executed.
command
,
Command.Priority
the command priority.
priority
)

Submits the given command for execution.

public default void
switchProtocol(String
the application protocol ID
protocolId
,
FutureCallback<ProtocolIOSession>
the result callback
callback
)

Switches this I/O session to the application protocol with the given ID.

Inherited from org.apache.hc.core5.http.HttpConnection:
closegetEndpointDetailsgetLocalAddressgetProtocolVersiongetRemoteAddressgetSSLSessionisOpen
Inherited from org.apache.hc.core5.reactor.ssl.TransportSecurityLayer:
getTlsDetailsstartTlsstartTls

Method Detail

activateback to summary
public void activate()

Restores the connection from idle mode.

passivateback to summary
public void passivate()

Puts the connection into idle mode.

submitCommandback to summary
public void submitCommand(Command command, Command.Priority priority)

Submits the given command for execution.

Parameters
command:Command

the command to be executed.

priority:Command.Priority

the command priority.

switchProtocolback to summary
public default void switchProtocol(String protocolId, FutureCallback<ProtocolIOSession> callback) throws UnsupportedOperationException

Switches this I/O session to the application protocol with the given ID.

Parameters
protocolId:String

the application protocol ID

callback:FutureCallback<ProtocolIOSession>

the result callback

Exceptions
UnsupportedOperationException:
if application protocol switch is not supported.
Since
5.2