Interface SslChannel

All Superinterfaces:
AutoCloseable, BoundChannel, Channel, Closeable, CloseableChannel, Configurable, ConnectedChannel, InterruptibleChannel
All Known Subinterfaces:
ConnectedSslStreamChannel
All Known Implementing Classes:
AssembledConnectedSslStreamChannel, AssembledSslChannel, JsseSslConnection, JsseSslStreamConnection, SslConnection

public interface SslChannel extends ConnectedChannel
A channel which can use SSL/TLS to negotiate a security layer.
  • Method Details

    • startHandshake

      void startHandshake() throws IOException
      Start or restart the SSL/TLS handshake. To force a complete SSL/TLS session renegotiation, the current session should be invalidated prior to calling this method. This method is not needed for the initial handshake as sending or receiving over the channel will automatically initiate it.
      Throws:
      IOException - if an I/O error occurs
    • getSslSession

      SSLSession getSslSession()
      Get the current SSLSession for this channel.
      Returns:
      the current SSLSession
    • getCloseSetter

      ChannelListener.Setter<? extends SslChannel> getCloseSetter()
      Get the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.
      Specified by:
      getCloseSetter in interface BoundChannel
      Specified by:
      getCloseSetter in interface CloseableChannel
      Specified by:
      getCloseSetter in interface ConnectedChannel
      Returns:
      the setter
    • getHandshakeSetter

      ChannelListener.Setter<? extends SslChannel> getHandshakeSetter()
      Get the setter which can be used to change the handshake listener for this channel.
      Returns:
      the setter