public class DefaultSSLWebSocketServerFactory extends Object implements WebSocketServerFactory
| Modifier and Type | Field and Description |
|---|---|
protected ExecutorService |
exec |
protected SSLContext |
sslcontext |
| Constructor and Description |
|---|
DefaultSSLWebSocketServerFactory(SSLContext sslContext) |
DefaultSSLWebSocketServerFactory(SSLContext sslContext,
ExecutorService exec) |
| 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
|
ByteChannel |
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.
|
protected SSLContext sslcontext
protected ExecutorService exec
public DefaultSSLWebSocketServerFactory(SSLContext sslContext)
public DefaultSSLWebSocketServerFactory(SSLContext sslContext, ExecutorService exec)
public ByteChannel wrapChannel(SocketChannel channel, SelectionKey key) throws IOException
WebSocketServerFactorywrapChannel in interface WebSocketServerFactorychannel - The SocketChannel to wrapkey - a SelectionKey of an open SocketChannel.IOException - may be thrown while writing on the channelpublic WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d)
WebSocketFactorycreateWebSocket in interface WebSocketFactorycreateWebSocket in interface WebSocketServerFactorya - The Listener for the WebsocketImpld - The draft which should be usedpublic WebSocketImpl createWebSocket(WebSocketAdapter a, List<Draft> d)
WebSocketFactorycreateWebSocket in interface WebSocketFactorycreateWebSocket in interface WebSocketServerFactorya - The Listener for the WebsocketImpld - The drafts which should be usedpublic void close()
WebSocketServerFactoryclose in interface WebSocketServerFactoryCopyright © 2017. All rights reserved.