org.cometd.server.transports
Class WebSocketTransport

java.lang.Object
  extended by org.cometd.server.ServerTransport
      extended by org.cometd.server.transports.HttpTransport
          extended by org.cometd.server.transports.WebSocketTransport
All Implemented Interfaces:
Transport

public class WebSocketTransport
extends HttpTransport


Nested Class Summary
protected  class WebSocketTransport.WebSocketDispatcher
           
 
Nested classes/interfaces inherited from class org.cometd.server.ServerTransport
ServerTransport.Dispatcher
 
Field Summary
static java.lang.String BUFFER_SIZE_OPTION
           
static java.lang.String NAME
           
static java.lang.String PROTOCOL_OPTION
           
 
Fields inherited from class org.cometd.server.transports.HttpTransport
MESSAGE_PARAM
 
Fields inherited from class org.cometd.server.ServerTransport
_advice, _bayeux, _interval, _maxInterval, _maxLazyTimeout, _metaConnectDeliveryOnly, _prefix, _timeout, INTERVAL_OPTION, MAX_INTERVAL_OPTION, MAX_LAZY_OPTION, META_CONNECT_DELIVERY_OPTION, TIMEOUT_OPTION
 
Constructor Summary
WebSocketTransport(BayeuxServerImpl bayeux, java.util.Map<java.lang.String,java.lang.Object> options)
           
 
Method Summary
protected  java.lang.String checkOrigin(javax.servlet.http.HttpServletRequest request, java.lang.String host, java.lang.String origin)
           
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void init()
          Initialise the transport.
 
Methods inherited from class org.cometd.server.transports.HttpTransport
getCurrentRequest, parseMessages, setCurrentRequest
 
Methods inherited from class org.cometd.server.ServerTransport
getAdvice, getInterval, getMaxInterval, getMaxLazyTimeout, getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, getTimeout, isMetaConnectDeliveryOnly, setMetaConnectDeliveryOnly, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

PROTOCOL_OPTION

public static final java.lang.String PROTOCOL_OPTION
See Also:
Constant Field Values

BUFFER_SIZE_OPTION

public static final java.lang.String BUFFER_SIZE_OPTION
See Also:
Constant Field Values
Constructor Detail

WebSocketTransport

public WebSocketTransport(BayeuxServerImpl bayeux,
                          java.util.Map<java.lang.String,java.lang.Object> options)
Method Detail

init

public void init()
Description copied from class: ServerTransport
Initialise the transport. Initialise the transport, resolving default and direct options. After the call to init, the #getMutableOptions() set should be reset to reflect only the options that can be changed on a running transport. This implementation clears the mutable options set.

Overrides:
init in class HttpTransport

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Specified by:
handle in class HttpTransport
Throws:
java.io.IOException
javax.servlet.ServletException

checkOrigin

protected java.lang.String checkOrigin(javax.servlet.http.HttpServletRequest request,
                                       java.lang.String host,
                                       java.lang.String origin)


Copyright © 2010 Dojo Foundation. All Rights Reserved.