Package org.java_websocket.server
Class CustomSSLWebSocketServerFactory
- java.lang.Object
- 
- org.java_websocket.server.DefaultSSLWebSocketServerFactory
- 
- org.java_websocket.server.CustomSSLWebSocketServerFactory
 
 
- 
- All Implemented Interfaces:
- WebSocketFactory,- WebSocketServerFactory
 
 public class CustomSSLWebSocketServerFactory extends DefaultSSLWebSocketServerFactory WebSocketFactory that can be configured to only support specific protocols and cipher suites.
- 
- 
Field Summary- 
Fields inherited from class org.java_websocket.server.DefaultSSLWebSocketServerFactoryexec, sslcontext
 
- 
 - 
Constructor SummaryConstructors Constructor Description CustomSSLWebSocketServerFactory(SSLContext sslContext, String[] enabledProtocols, String[] enabledCiphersuites)New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.CustomSSLWebSocketServerFactory(SSLContext sslContext, ExecutorService executerService, String[] enabledProtocols, String[] enabledCiphersuites)New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteChannelwrapChannel(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.DefaultSSLWebSocketServerFactoryclose, createWebSocket, createWebSocket
 
- 
 
- 
- 
- 
Constructor Detail- 
CustomSSLWebSocketServerFactorypublic CustomSSLWebSocketServerFactory(SSLContext sslContext, String[] enabledProtocols, String[] enabledCiphersuites) New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.- Parameters:
- sslContext- - can not be- null
- enabledProtocols- - only these protocols are enabled, when- nulldefault settings will be used.
- enabledCiphersuites- - only these cipher suites are enabled, when- nulldefault settings will be used.
 
 - 
CustomSSLWebSocketServerFactorypublic CustomSSLWebSocketServerFactory(SSLContext sslContext, ExecutorService executerService, String[] enabledProtocols, String[] enabledCiphersuites) New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.- Parameters:
- sslContext- - can not be- null
- executerService- - can not be- null
- enabledProtocols- - only these protocols are enabled, when- nulldefault settings will be used.
- enabledCiphersuites- - only these cipher suites are enabled, when- nulldefault settings will be used.
 
 
- 
 - 
Method Detail- 
wrapChannelpublic ByteChannel wrapChannel(SocketChannel channel, SelectionKey key) throws IOException Description copied from interface:WebSocketServerFactoryAllows to wrap the Socketchannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.- Specified by:
- wrapChannelin interface- WebSocketServerFactory
- Overrides:
- wrapChannelin class- DefaultSSLWebSocketServerFactory
- Parameters:
- channel- The SocketChannel to wrap
- key- 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
 
 
- 
 
-