org.eclipse.jetty.websocket
接口 WebSocketFactory.Acceptor

所有已知实现类:
WebSocketHandler, WebSocketServlet
包容类:
WebSocketFactory

public static interface WebSocketFactory.Acceptor


方法摘要
 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.
 

方法详细信息

doWebSocketConnect

WebSocket doWebSocketConnect(HttpServletRequest request,
                             String protocol)

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

参数:
request - the incoming HTTP upgrade request
protocol - the websocket sub protocol
返回:
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.

参数:
request - the incoming HTTP upgrade request
origin - the origin URI
返回:
boolean to indicate that the origin is acceptable.


Copyright © 2013. All Rights Reserved.