org.eclipse.jetty.websocket

## Interface WebSocketFactory.Acceptor

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

      public static interface WebSocketFactory.Acceptor

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkOrigin(javax.servlet.http.HttpServletRequest request, String origin)` Checks the origin of an incoming WebSocket handshake request.
    `WebSocket` | `doWebSocketConnect(javax.servlet.http.HttpServletRequest request, String protocol)` Factory method that applications needs to implement to return a `WebSocket` object.

- - ### Method Detail

    - #### doWebSocketConnect

          WebSocket doWebSocketConnect(javax.servlet.http.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(javax.servlet.http.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-2012 Mort Bay Consulting. All Rights Reserved.