org.java_websocket.server
Class DefaultWebSocketServerFactory

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

public class DefaultWebSocketServerFactory
extends Object
implements WebSocketServer.WebSocketServerFactory


Constructor Summary
DefaultWebSocketServerFactory()
           
 
Method Summary
 WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d, Socket s)
           
 WebSocketImpl createWebSocket(WebSocketAdapter a, List<Draft> d, Socket s)
           
 SocketChannel 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
 

Constructor Detail

DefaultWebSocketServerFactory

public DefaultWebSocketServerFactory()
Method Detail

createWebSocket

public WebSocketImpl createWebSocket(WebSocketAdapter a,
                                     Draft d,
                                     Socket s)
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

wrapChannel

public SocketChannel wrapChannel(SocketChannel channel,
                                 SelectionKey key)
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.


Copyright © 2013 Pusher. All Rights Reserved.