-
- All Implemented Interfaces:
-
com.tds.common.websocket.conn.WebSocketFactory,com.tds.common.websocket.conn.WebSocketServerFactory
public class DefaultWebSocketServerFactory implements WebSocketServerFactory
-
-
Method Summary
Modifier and Type Method Description WebSocketImplcreateWebSocket(WebSocketAdapter a, Draft d)Create a new Websocket with the provided listener, drafts and socket WebSocketImplcreateWebSocket(WebSocketAdapter a, List<Draft> d)Create a new Websocket with the provided listener, drafts and socket SocketChannelwrapChannel(SocketChannel channel, SelectionKey key)Allows to wrap the SocketChannel( key.channel() ) to insert a protocol layer( like ssl or proxyauthentication) beyond the ws layer. voidclose()Allows to shutdown the websocket factory for a clean shutdown -
Methods inherited from class com.tds.common.websocket.conn.WebSocketServerFactory
createWebSocket, wrapChannel -
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
-
createWebSocket
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
WebSocketImpl createWebSocket(WebSocketAdapter a, List<Draft> d)
Create a new Websocket with the provided listener, drafts and socket
- Parameters:
a- The Listener for the WebsocketImpl
-
wrapChannel
SocketChannel 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
void close()
Allows to shutdown the websocket factory for a clean shutdown
-
-
-
-