org.java_websocket.server
Class DefaultSSLWebSocketServerFactory

java.lang.Object
  extended by org.java_websocket.server.DefaultSSLWebSocketServerFactory
All Implemented Interfaces:
WebSocketServer.WebSocketServerFactory, WebSocketFactory

public class DefaultSSLWebSocketServerFactory
extends Object
implements WebSocketServer.WebSocketServerFactory


Field Summary
protected  ExecutorService exec
           
protected  SSLContext sslcontext
           
 
Constructor Summary
DefaultSSLWebSocketServerFactory(SSLContext sslContext)
           
DefaultSSLWebSocketServerFactory(SSLContext sslContext, ExecutorService exec)
           
 
Method Summary
 WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d, Socket c)
           
 WebSocketImpl createWebSocket(WebSocketAdapter a, List<Draft> d, Socket s)
           
 ByteChannel wrapChannel(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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sslcontext

protected SSLContext sslcontext

exec

protected ExecutorService exec
Constructor Detail

DefaultSSLWebSocketServerFactory

public DefaultSSLWebSocketServerFactory(SSLContext sslContext)

DefaultSSLWebSocketServerFactory

public DefaultSSLWebSocketServerFactory(SSLContext sslContext,
                                        ExecutorService exec)
Method Detail

wrapChannel

public ByteChannel wrapChannel(SocketChannel channel,
                               SelectionKey key)
                        throws IOException
Description copied from interface: WebSocketServer.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 interface WebSocketServer.WebSocketServerFactory
key - a SelectionKey of an open SocketChannel.
Returns:
The channel on which the read and write operations will be performed.
Throws:
IOException

createWebSocket

public WebSocketImpl createWebSocket(WebSocketAdapter a,
                                     Draft d,
                                     Socket c)
Specified by:
createWebSocket in interface WebSocketServer.WebSocketServerFactory
Specified by:
createWebSocket in interface WebSocketFactory

createWebSocket

public WebSocketImpl createWebSocket(WebSocketAdapter a,
                                     List<Draft> d,
                                     Socket s)
Specified by:
createWebSocket in interface WebSocketServer.WebSocketServerFactory
Specified by:
createWebSocket in interface WebSocketFactory


Copyright © 2013 Pusher. All Rights Reserved.