Package 

Interface WebSocketServerFactory

  • All Implemented Interfaces:
    com.tds.common.websocket.conn.WebSocketFactory

    
    public interface WebSocketServerFactory
     implements WebSocketFactory
                        

    Interface to encapsulate the required methods for a websocket factory

    • Method Summary

      Modifier and Type Method Description
      abstract WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d) Create a new Websocket with the provided listener, drafts and socket
      abstract WebSocketImpl createWebSocket(WebSocketAdapter a, List<Draft> drafts) Create a new Websocket with the provided listener, drafts and socket
      abstract ByteChannel wrapChannel(SocketChannel channel, SelectionKey key) Allows to wrap the SocketChannel( key.channel() ) to insert a protocol layer( like ssl or proxyauthentication) beyond the ws layer.
      abstract void close() Allows to shutdown the websocket factory for a clean shutdown
      • Methods inherited from class com.tds.common.websocket.conn.WebSocketFactory

        createWebSocket, createWebSocket
      • Methods inherited from class java.lang.Object

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

      • wrapChannel

         abstract ByteChannel wrapChannel(SocketChannel channel, SelectionKey key)

        Allows to wrap the SocketChannel( key.channel() ) to insert a protocol layer( like ssl or proxyauthentication) beyond the ws layer.

        Parameters:
        channel - The SocketChannel to wrap
        key - a SelectionKey of an open SocketChannel.
      • close

         abstract void close()

        Allows to shutdown the websocket factory for a clean shutdown