public class CustomSSLWebSocketServerFactory extends DefaultSSLWebSocketServerFactory
exec, sslcontext
Constructor and Description |
---|
CustomSSLWebSocketServerFactory(SSLContext sslContext,
ExecutorService executerService,
String[] enabledProtocols,
String[] enabledCiphersuites)
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
|
CustomSSLWebSocketServerFactory(SSLContext sslContext,
String[] enabledProtocols,
String[] enabledCiphersuites)
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
|
Modifier and Type | Method and Description |
---|---|
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.
|
close, createWebSocket, createWebSocket
public CustomSSLWebSocketServerFactory(SSLContext sslContext, String[] enabledProtocols, String[] enabledCiphersuites)
sslContext
- - can not be null
enabledProtocols
- - only these protocols are enabled, when null
default settings will be used.enabledCiphersuites
- - only these cipher suites are enabled, when null
default settings will be used.public CustomSSLWebSocketServerFactory(SSLContext sslContext, ExecutorService executerService, String[] enabledProtocols, String[] enabledCiphersuites)
sslContext
- - can not be null
executerService
- - can not be null
enabledProtocols
- - only these protocols are enabled, when null
default settings will be used.enabledCiphersuites
- - only these cipher suites are enabled, when null
default settings will be used.public ByteChannel wrapChannel(SocketChannel channel, SelectionKey key) throws IOException
WebSocketServerFactory
wrapChannel
in interface WebSocketServerFactory
wrapChannel
in class DefaultSSLWebSocketServerFactory
channel
- The SocketChannel to wrapkey
- a SelectionKey of an open SocketChannel.IOException
- may be thrown while writing on the channelCopyright © 2018. All rights reserved.