Package org.java_websocket.server
Class SSLParametersWebSocketServerFactory
java.lang.Object
org.java_websocket.server.DefaultSSLWebSocketServerFactory
org.java_websocket.server.SSLParametersWebSocketServerFactory
- All Implemented Interfaces:
WebSocketFactory
,WebSocketServerFactory
WebSocketFactory that can be configured to only support specific protocols and cipher suites.
-
Field Summary
Fields inherited from class org.java_websocket.server.DefaultSSLWebSocketServerFactory
exec, sslcontext
-
Constructor Summary
ConstructorsConstructorDescriptionSSLParametersWebSocketServerFactory
(SSLContext sslContext, ExecutorService executerService, SSLParameters sslParameters) New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.SSLParametersWebSocketServerFactory
(SSLContext sslContext, SSLParameters sslParameters) New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites. -
Method Summary
Modifier and TypeMethodDescriptionwrapChannel
(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.Methods inherited from class org.java_websocket.server.DefaultSSLWebSocketServerFactory
close, createWebSocket, createWebSocket
-
Constructor Details
-
SSLParametersWebSocketServerFactory
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.- Parameters:
sslContext
- - can not benull
sslParameters
- - can not benull
-
SSLParametersWebSocketServerFactory
public SSLParametersWebSocketServerFactory(SSLContext sslContext, ExecutorService executerService, SSLParameters sslParameters) New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.- Parameters:
sslContext
- - can not benull
executerService
- - can not benull
sslParameters
- - can not benull
-
-
Method Details
-
wrapChannel
Description copied from interface:WebSocketServerFactory
Allows to wrap the SocketChannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.- Specified by:
wrapChannel
in interfaceWebSocketServerFactory
- Overrides:
wrapChannel
in classDefaultSSLWebSocketServerFactory
- Parameters:
channel
- The SocketChannel to wrapkey
- a SelectionKey of an open SocketChannel.- Returns:
- The channel on which the read and write operations will be performed.
- Throws:
IOException
- may be thrown while writing on the channel
-