Interface ProtocolIOSession

All Superinterfaces:
AutoCloseable, ByteChannel, Channel, Closeable, Identifiable, IOSession, ModalCloseable, ReadableByteChannel, SocketModalCloseable, TransportSecurityLayer, WritableByteChannel
All Known Implementing Classes:
InternalDataChannel

public interface ProtocolIOSession extends IOSession, TransportSecurityLayer
TLS capable, protocol upgradable IOSession.
Since:
5.0
  • Method Details

    • switchProtocol

      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 - the application protocol ID
      callback - the result callback
      Throws:
      UnsupportedOperationException - if application protocol switch is not supported.
    • registerProtocol

      default void registerProtocol(String protocolId, ProtocolUpgradeHandler upgradeHandler)
      Registers protocol upgrade handler with the given application protocol ID.
      Parameters:
      protocolId - the application protocol ID
      upgradeHandler - the upgrade handler.
      Since:
      5.2, 5.2
    • getInitialEndpoint

      NamedEndpoint getInitialEndpoint()