Class CustomSSLWebSocketServerFactory

    • Constructor Summary

      Constructors 
      Constructor Description
      CustomSSLWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext, java.lang.String[] enabledProtocols, java.lang.String[] enabledCiphersuites)
      New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
      CustomSSLWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext, java.util.concurrent.ExecutorService executerService, java.lang.String[] enabledProtocols, java.lang.String[] enabledCiphersuites)
      New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.channels.ByteChannel wrapChannel​(java.nio.channels.SocketChannel channel, java.nio.channels.SelectionKey key)
      Allows to wrap the Socketchannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • enabledProtocols

        private final java.lang.String[] enabledProtocols
        The enabled protocols saved as a String array
      • enabledCiphersuites

        private final java.lang.String[] enabledCiphersuites
        The enabled ciphersuites saved as a String array
    • Constructor Detail

      • CustomSSLWebSocketServerFactory

        public CustomSSLWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext,
                                               java.lang.String[] enabledProtocols,
                                               java.lang.String[] enabledCiphersuites)
        New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
        Parameters:
        sslContext - - can not be null
        enabledProtocols - - only these protocols are enabled, when null default settings will be used.
        enabledCiphersuites - - only these cipher suites are enabled, when null default settings will be used.
      • CustomSSLWebSocketServerFactory

        public CustomSSLWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext,
                                               java.util.concurrent.ExecutorService executerService,
                                               java.lang.String[] enabledProtocols,
                                               java.lang.String[] enabledCiphersuites)
        New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
        Parameters:
        sslContext - - can not be null
        executerService - - can not be null
        enabledProtocols - - only these protocols are enabled, when null default settings will be used.
        enabledCiphersuites - - only these cipher suites are enabled, when null default settings will be used.
    • Method Detail

      • wrapChannel

        public java.nio.channels.ByteChannel wrapChannel​(java.nio.channels.SocketChannel channel,
                                                         java.nio.channels.SelectionKey key)
                                                  throws java.io.IOException
        Description copied from interface: WebSocketServerFactory
        Allows to wrap the Socketchannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.
        Specified by:
        wrapChannel in interface WebSocketServerFactory
        Overrides:
        wrapChannel in class DefaultSSLWebSocketServerFactory
        Parameters:
        channel - The SocketChannel to wrap
        key - a SelectionKey of an open SocketChannel.
        Returns:
        The channel on which the read and write operations will be performed.
        Throws:
        java.io.IOException - may be thrown while writing on the channel