org.eclipse.jetty.websocket
Interface WebSocketFactory.Acceptor

All Known Implementing Classes:
WebSocketHandler, WebSocketServlet
Enclosing class:
WebSocketFactory

public static interface WebSocketFactory.Acceptor


Method Summary
 boolean checkOrigin(HttpServletRequest request, String origin)
          Checks the origin of an incoming WebSocket handshake request.
 WebSocket doWebSocketConnect(HttpServletRequest request, String protocol)
          Factory method that applications needs to implement to return a WebSocket object.
 

Method Detail

doWebSocketConnect

WebSocket doWebSocketConnect(HttpServletRequest request,
                             String protocol)

Factory method that applications needs to implement to return a WebSocket object.

Parameters:
request - the incoming HTTP upgrade request
protocol - the websocket sub protocol
Returns:
a new WebSocket object that will handle websocket events.

checkOrigin

boolean checkOrigin(HttpServletRequest request,
                    String origin)

Checks the origin of an incoming WebSocket handshake request.

Parameters:
request - the incoming HTTP upgrade request
origin - the origin URI
Returns:
boolean to indicate that the origin is acceptable.


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.