WebSocketFactory, WebSocketServerFactoryCustomSSLWebSocketServerFactorypublic class DefaultSSLWebSocketServerFactory extends java.lang.Object implements WebSocketServerFactory
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.concurrent.ExecutorService |
exec |
|
protected javax.net.ssl.SSLContext |
sslcontext |
| Constructor | Description |
|---|---|
DefaultSSLWebSocketServerFactory(javax.net.ssl.SSLContext sslContext) |
|
DefaultSSLWebSocketServerFactory(javax.net.ssl.SSLContext sslContext,
java.util.concurrent.ExecutorService exec) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Allows to shutdown the websocket factory for a clean shutdown
|
WebSocketImpl |
createWebSocket(WebSocketAdapter a,
java.util.List<Draft> d) |
Create a new Websocket with the provided listener, drafts and socket
|
WebSocketImpl |
createWebSocket(WebSocketAdapter a,
Draft d) |
Create a new Websocket with the provided listener, drafts and socket
|
java.nio.channels.ByteChannel |
wrapChannel(java.nio.channels.SocketChannel channel,
java.nio.channels.SelectionKey key) |
Allows to wrap the Socketchannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.
|
protected javax.net.ssl.SSLContext sslcontext
protected java.util.concurrent.ExecutorService exec
public DefaultSSLWebSocketServerFactory(javax.net.ssl.SSLContext sslContext)
public DefaultSSLWebSocketServerFactory(javax.net.ssl.SSLContext sslContext,
java.util.concurrent.ExecutorService exec)
public java.nio.channels.ByteChannel wrapChannel(java.nio.channels.SocketChannel channel,
java.nio.channels.SelectionKey key)
throws java.io.IOException
WebSocketServerFactorywrapChannel in interface WebSocketServerFactorychannel - The SocketChannel to wrapkey - a SelectionKey of an open SocketChannel.java.io.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, java.util.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 WebSocketServerFactory