org.java_websocket.server
Interface WebSocketServer.WebSocketServerFactory

All Superinterfaces:
WebSocketFactory
All Known Implementing Classes:
DefaultSSLWebSocketServerFactory, DefaultWebSocketServerFactory
Enclosing class:
WebSocketServer

public static interface WebSocketServer.WebSocketServerFactory
extends WebSocketFactory


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

Method Detail

createWebSocket

WebSocketImpl createWebSocket(WebSocketAdapter a,
                              Draft d,
                              Socket s)
Specified by:
createWebSocket in interface WebSocketFactory

createWebSocket

WebSocketImpl createWebSocket(WebSocketAdapter a,
                              List<Draft> drafts,
                              Socket s)
Specified by:
createWebSocket in interface WebSocketFactory

wrapChannel

ByteChannel wrapChannel(SocketChannel channel,
                        SelectionKey key)
                        throws IOException
Allows to wrap the Socketchannel( key.channel() ) to insert a protocol layer( like ssl or proxy authentication) beyond the ws layer.

Parameters:
key - a SelectionKey of an open SocketChannel.
Returns:
The channel on which the read and write operations will be performed.
Throws:
IOException


Copyright © 2013 Pusher. All Rights Reserved.