public class DefaultWebSocketServerFactory extends Object implements WebSocketServer.WebSocketServerFactory
| Constructor and Description |
|---|
DefaultWebSocketServerFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Allows to shutdown the websocket factory for a clean shutdown
|
WebSocketImpl |
createWebSocket(WebSocketAdapter a,
Draft d)
Create a new Websocket with the provided listener, drafts and socket
|
WebSocketImpl |
createWebSocket(WebSocketAdapter a,
List<Draft> d)
Create a new Websocket with the provided listener, drafts and socket
|
SocketChannel |
wrapChannel(SocketChannel channel,
SelectionKey key)
Allows to wrap the Socketchannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.
|
public WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d)
WebSocketFactorycreateWebSocket in interface WebSocketServer.WebSocketServerFactorycreateWebSocket in interface WebSocketFactorya - The Listener for the WebsocketImpld - The draft which should be usedpublic WebSocketImpl createWebSocket(WebSocketAdapter a, List<Draft> d)
WebSocketFactorycreateWebSocket in interface WebSocketServer.WebSocketServerFactorycreateWebSocket in interface WebSocketFactorya - The Listener for the WebsocketImpld - The drafts which should be usedpublic SocketChannel wrapChannel(SocketChannel channel, SelectionKey key)
WebSocketServer.WebSocketServerFactorywrapChannel in interface WebSocketServer.WebSocketServerFactorychannel - The SocketChannel to wrapkey - a SelectionKey of an open SocketChannel.public void close()
WebSocketServer.WebSocketServerFactoryclose in interface WebSocketServer.WebSocketServerFactoryCopyright © 2017. All rights reserved.