Class DefaultSSLWebSocketServerFactory

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.concurrent.ExecutorService exec  
      protected javax.net.ssl.SSLContext sslcontext  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Allows to shutdown the websocket factory for a clean shutdown
      WebSocketImpl createWebSocket​(WebSocketAdapter a, java.util.List<Draft> d)
      Create a new Websocket with the provided listener, drafts and socket
      WebSocketImpl createWebSocket​(WebSocketAdapter a, Draft d)
      Create a new Websocket with the provided listener, drafts and socket
      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

      • sslcontext

        protected javax.net.ssl.SSLContext sslcontext
      • exec

        protected java.util.concurrent.ExecutorService exec
    • Constructor Detail

      • DefaultSSLWebSocketServerFactory

        public DefaultSSLWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext)
      • DefaultSSLWebSocketServerFactory

        public DefaultSSLWebSocketServerFactory​(javax.net.ssl.SSLContext sslContext,
                                                java.util.concurrent.ExecutorService exec)
    • 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
        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