Class SSLParametersWebSocketServerFactory

    • Constructor Summary

      Constructors 
      Constructor Description
      SSLParametersWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext, java.util.concurrent.ExecutorService executerService, javax.net.ssl.SSLParameters sslParameters)
      New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
      SSLParametersWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext, javax.net.ssl.SSLParameters sslParameters)
      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

      • sslParameters

        private final javax.net.ssl.SSLParameters sslParameters
    • Constructor Detail

      • SSLParametersWebSocketServerFactory

        public SSLParametersWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext,
                                                   javax.net.ssl.SSLParameters sslParameters)
        New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
        Parameters:
        sslContext - - can not be null
        sslParameters - - can not be null
      • SSLParametersWebSocketServerFactory

        public SSLParametersWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext,
                                                   java.util.concurrent.ExecutorService executerService,
                                                   javax.net.ssl.SSLParameters sslParameters)
        New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
        Parameters:
        sslContext - - can not be null
        executerService - - can not be null
        sslParameters - - can not be null
    • 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