Class SSLClient

  • Direct Known Subclasses:
    SSLStompClient

    public abstract class SSLClient
    extends StompCommonClient
    ReactorClient implementation to provide encrypted communication.
    • Field Detail

      • log

        protected static org.slf4j.Logger log
      • selector

        protected final java.nio.channels.Selector selector
      • sslContext

        private javax.net.ssl.SSLContext sslContext
      • client

        private boolean client
    • Method Detail

      • createSSLEngine

        protected javax.net.ssl.SSLEngine createSSLEngine​(boolean clientMode)
      • read

        protected int read​(java.nio.ByteBuffer buff)
                    throws java.io.IOException
        Description copied from class: ReactorClient
        Reads provided buffer.
        Specified by:
        read in class ReactorClient
        Parameters:
        buff - provided buffer to be read.
        Returns:
        Number of bytes read.
        Throws:
        java.io.IOException - when networking issue occurs.
      • write

        protected void write​(java.nio.ByteBuffer buff)
                      throws java.io.IOException
        Description copied from class: ReactorClient
        Writes provided buffer.
        Specified by:
        write in class ReactorClient
        Parameters:
        buff - provided buffer to be written.
        Throws:
        java.io.IOException - when networking issue occurs.
      • getPeerCertificates

        public java.util.List<java.security.cert.Certificate> getPeerCertificates()
        Overrides:
        getPeerCertificates in class ReactorClient
        Returns:
        the peer certificates of the current session