Package org.java_websocket.server
Class DefaultSSLWebSocketServerFactory
java.lang.Object
org.java_websocket.server.DefaultSSLWebSocketServerFactory
- All Implemented Interfaces:
WebSocketFactory
,WebSocketServerFactory
- Direct Known Subclasses:
CustomSSLWebSocketServerFactory
,SSLParametersWebSocketServerFactory
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSSLWebSocketServerFactory
(SSLContext sslContext) DefaultSSLWebSocketServerFactory
(SSLContext sslContext, ExecutorService exec) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Allows to shutdown the websocket factory for a clean shutdowncreateWebSocket
(WebSocketAdapter a, List<Draft> d) Create a new Websocket with the provided listener, drafts and socketCreate a new Websocket with the provided listener, drafts and socketwrapChannel
(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.
-
Field Details
-
sslcontext
-
exec
-
-
Constructor Details
-
DefaultSSLWebSocketServerFactory
-
DefaultSSLWebSocketServerFactory
-
-
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
- 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
-
createWebSocket
Description copied from interface:WebSocketFactory
Create a new Websocket with the provided listener, drafts and socket- Specified by:
createWebSocket
in interfaceWebSocketFactory
- Specified by:
createWebSocket
in interfaceWebSocketServerFactory
- Parameters:
a
- The Listener for the WebsocketImpld
- The draft which should be used- Returns:
- A WebsocketImpl
-
createWebSocket
Description copied from interface:WebSocketFactory
Create a new Websocket with the provided listener, drafts and socket- Specified by:
createWebSocket
in interfaceWebSocketFactory
- Specified by:
createWebSocket
in interfaceWebSocketServerFactory
- Parameters:
a
- The Listener for the WebsocketImpld
- The drafts which should be used- Returns:
- A WebsocketImpl
-
close
public void close()Description copied from interface:WebSocketServerFactory
Allows to shutdown the websocket factory for a clean shutdown- Specified by:
close
in interfaceWebSocketServerFactory
-