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
public class SSLParametersWebSocketServerFactory extends DefaultSSLWebSocketServerFactory
WebSocketFactory that can be configured to only support specific protocols and cipher suites.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.net.ssl.SSLParameters
sslParameters
-
Fields inherited from class org.java_websocket.server.DefaultSSLWebSocketServerFactory
exec, sslcontext
-
-
Constructor Summary
Constructors Constructor Description SSLParametersWebSocketServerFactory(javax.net.ssl.SSLContext sslContext, java.util.concurrent.ExecutorService executerService, javax.net.ssl.SSLParameters sslParameters)
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.SSLParametersWebSocketServerFactory(javax.net.ssl.SSLContext sslContext, javax.net.ssl.SSLParameters sslParameters)
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class org.java_websocket.server.DefaultSSLWebSocketServerFactory
close, createWebSocket, createWebSocket
-
-
-
-
Constructor Detail
-
SSLParametersWebSocketServerFactory
public SSLParametersWebSocketServerFactory(javax.net.ssl.SSLContext sslContext, javax.net.ssl.SSLParameters sslParameters)
New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.- Parameters:
sslContext
- - can not benull
sslParameters
- - can not benull
-
SSLParametersWebSocketServerFactory
public SSLParametersWebSocketServerFactory(javax.net.ssl.SSLContext sslContext, java.util.concurrent.ExecutorService executerService, javax.net.ssl.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 Detail
-
wrapChannel
public java.nio.channels.ByteChannel wrapChannel(java.nio.channels.SocketChannel channel, java.nio.channels.SelectionKey key) throws java.io.IOException
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:
java.io.IOException
- may be thrown while writing on the channel
-
-