Top Description Fields Constructors Methods
org.java_websocket.server

public Class SSLParametersWebSocketServerFactory

extends DefaultSSLWebSocketServerFactory
Class Inheritance
Imports
java.io.IOException, java.nio.channels.ByteChannel, .SelectionKey, .SocketChannel, java.util.concurrent.ExecutorService, .Executors, javax.net.ssl.SSLContext, .SSLEngine, .SSLParameters, org.java_websocket.SSLSocketChannel2

WebSocketFactory that can be configured to only support specific protocols and cipher suites.

Field Summary

Modifier and TypeField and Description
private final SSLParameters
Inherited from org.java_websocket.server.DefaultSSLWebSocketServerFactory:
execsslcontext

Constructor Summary

AccessConstructor and Description
public
SSLParametersWebSocketServerFactory(SSLContext
- can not be null
sslContext
,
SSLParameters
- can not be null
sslParameters
)

New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.

public
SSLParametersWebSocketServerFactory(SSLContext
- can not be null
sslContext
,
ExecutorService
- can not be null
executerService
,
SSLParameters
- can not be null
sslParameters
)

New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.

Method Summary

Modifier and TypeMethod and Description
public ByteChannel
wrapChannel(SocketChannel channel, SelectionKey key)

Overrides org.java_websocket.server.DefaultSSLWebSocketServerFactory.wrapChannel.

Implements org.java_websocket.WebSocketServerFactory.wrapChannel.

Allows to wrap the SocketChannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.

Inherited from org.java_websocket.server.DefaultSSLWebSocketServerFactory:
closecreateWebSocketcreateWebSocket

Field Detail

sslParametersback to summary
private final SSLParameters sslParameters

Constructor Detail

SSLParametersWebSocketServerFactoryback to summary
public SSLParametersWebSocketServerFactory(SSLContext sslContext, SSLParameters sslParameters)

New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.

Parameters
sslContext:SSLContext

- can not be null

sslParameters:SSLParameters

- can not be null

SSLParametersWebSocketServerFactoryback to summary
public SSLParametersWebSocketServerFactory(SSLContext sslContext, ExecutorService executerService, SSLParameters sslParameters)

New CustomSSLWebSocketServerFactory configured to only support given protocols and given cipher suites.

Parameters
sslContext:SSLContext

- can not be null

executerService:ExecutorService

- can not be null

sslParameters:SSLParameters

- can not be null

Method Detail

wrapChannelback to summary
public ByteChannel wrapChannel(SocketChannel channel, SelectionKey key) throws IOException

Overrides org.java_websocket.server.DefaultSSLWebSocketServerFactory.wrapChannel.

Implements org.java_websocket.WebSocketServerFactory.wrapChannel.

Doc from org.java_websocket.WebSocketServerFactory.wrapChannel.

Allows to wrap the SocketChannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.

Annotations
@Override
Exceptions
IOException:
may be thrown while writing on the channel