public class CustomSSLWebSocketServerFactory extends DefaultSSLWebSocketServerFactory
构造器和说明 |
---|
CustomSSLWebSocketServerFactory(javax.net.ssl.SSLContext sslContext,
java.util.concurrent.ExecutorService executerService,
java.lang.String[] enabledProtocols,
java.lang.String[] enabledCiphersuites)
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
|
CustomSSLWebSocketServerFactory(javax.net.ssl.SSLContext sslContext,
java.lang.String[] enabledProtocols,
java.lang.String[] enabledCiphersuites)
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
|
限定符和类型 | 方法和说明 |
---|---|
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.
|
close, createWebSocket, createWebSocket
public CustomSSLWebSocketServerFactory(javax.net.ssl.SSLContext sslContext, java.lang.String[] enabledProtocols, java.lang.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(javax.net.ssl.SSLContext sslContext, java.util.concurrent.ExecutorService executerService, java.lang.String[] enabledProtocols, java.lang.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 java.nio.channels.ByteChannel wrapChannel(java.nio.channels.SocketChannel channel, java.nio.channels.SelectionKey key) throws java.io.IOException
WebSocketServer.WebSocketServerFactory
wrapChannel
在接口中 WebSocketServer.WebSocketServerFactory
wrapChannel
在类中 DefaultSSLWebSocketServerFactory
channel
- The SocketChannel to wrapkey
- a SelectionKey of an open SocketChannel.java.io.IOException
- may be thrown while writing on the channel