-
- 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 -
-
Method Detail
-
createWebSocket
abstract WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d)
Create a new Websocket with the provided listener, drafts and socket
- Parameters:
a
- The Listener for the WebsocketImpld
- The draft which should be used
-
createWebSocket
abstract WebSocketImpl createWebSocket(WebSocketAdapter a, List<Draft> drafts)
Create a new Websocket with the provided listener, drafts and socket
- Parameters:
a
- The Listener for the WebsocketImpldrafts
- The drafts which should be used
-
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 wrapkey
- a SelectionKey of an open SocketChannel.
-
close
abstract void close()
Allows to shutdown the websocket factory for a clean shutdown
-
-
-
-