Top Description Methods
org.apache.hc.core5.reactor

public Interface ProtocolIOSession

extends IOSession, TransportSecurityLayer
Known Direct Implementers
org.apache.hc.core5.reactor.InternalDataChannel
Imports
org.apache.hc.core5.concurrent.FutureCallback, org.apache.hc.core5.net.NamedEndpoint, org.apache.hc.core5.reactor.ssl.TransportSecurityLayer

TLS capable, protocol upgradable IOSession.
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public NamedEndpoint
public default void
registerProtocol(String
the application protocol ID
protocolId
,
ProtocolUpgradeHandler
the upgrade handler.
upgradeHandler
)

Registers protocol upgrade handler with the given application protocol ID.

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.reactor.IOSession:
channelclearEventcloseenqueuegetEventMaskgetHandlergetLastEventTimegetLastReadTimegetLastWriteTimegetLocalAddressgetLockgetRemoteAddressgetSocketTimeoutgetStatushasCommandspollsetEventsetEventMasksetSocketTimeoutupdateReadTimeupdateWriteTimeupgrade
Inherited from org.apache.hc.core5.reactor.ssl.TransportSecurityLayer:
getTlsDetailsstartTlsstartTls

Method Detail

getInitialEndpointback to summary
public NamedEndpoint getInitialEndpoint()
registerProtocolback to summary
public default void registerProtocol(String protocolId, ProtocolUpgradeHandler upgradeHandler)

Registers protocol upgrade handler with the given application protocol ID.

Parameters
protocolId:String

the application protocol ID

upgradeHandler:ProtocolUpgradeHandler

the upgrade handler.

Since
5.2
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.