public abstract class WebSocketHandler extends HandlerWrapper implements WebSocketFactory.Acceptor
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener_handler_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
WebSocketHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkOrigin(HttpServletRequest request,
String origin)
Checks the origin of an incoming WebSocket handshake request.
|
WebSocketFactory |
getWebSocketFactory() |
void |
handle(String target,
Request baseRequest,
HttpServletRequest request,
HttpServletResponse response)
Handle a request.
|
destroy, doStart, doStop, expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler, setServerdump, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClassdumpThis, getServeraddBean, addBean, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanageaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoWebSocketConnectaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic WebSocketFactory getWebSocketFactory()
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
Handlerhandle in interface Handlerhandle in class HandlerWrappertarget - The target of the request - either a URI or a name.baseRequest - The original unwrapped request object.request - The request either as the Request
object or a wrapper of that request. The AbstractHttpConnection.getCurrentConnection()
method can be used access the Request object if required.response - The response as the Response
object or a wrapper of that request. The AbstractHttpConnection.getCurrentConnection()
method can be used access the Response object if required.IOExceptionServletExceptionpublic boolean checkOrigin(HttpServletRequest request, String origin)
WebSocketFactory.AcceptorChecks the origin of an incoming WebSocket handshake request.
checkOrigin in interface WebSocketFactory.Acceptorrequest - the incoming HTTP upgrade requestorigin - the origin URICopyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.