org.cometd.server.transport
Class WebSocketTransport

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

public class WebSocketTransport
extends HttpTransport


Nested Class Summary
protected  class WebSocketTransport.WebSocketScheduler
           
 
Nested classes/interfaces inherited from class org.cometd.server.AbstractServerTransport
AbstractServerTransport.OneTimeScheduler, AbstractServerTransport.Scheduler
 
Field Summary
static String BUFFER_SIZE_OPTION
           
static String NAME
           
static String PREFIX
           
static String PROTOCOL_OPTION
           
 
Fields inherited from class org.cometd.server.transport.HttpTransport
JSON_DEBUG_OPTION, MESSAGE_PARAM
 
Fields inherited from class org.cometd.server.AbstractServerTransport
INTERVAL_OPTION, MAX_INTERVAL_OPTION, MAX_LAZY_OPTION, META_CONNECT_DELIVERY_OPTION, TIMEOUT_OPTION
 
Constructor Summary
WebSocketTransport(BayeuxServerImpl bayeux)
           
 
Method Summary
 boolean accept(javax.servlet.http.HttpServletRequest request)
           
protected  String checkOrigin(javax.servlet.http.HttpServletRequest request, String host, String origin)
           
 BayeuxContext getContext()
           
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void init()
          Initialise the transport.
 
Methods inherited from class org.cometd.server.transport.HttpTransport
getCurrentLocalAddress, getCurrentRemoteAddress, getCurrentRequest, parseMessages, setCurrentRequest
 
Methods inherited from class org.cometd.server.AbstractServerTransport
doSweep, getAdvice, getBayeux, getInterval, getMaxInterval, getMaxLazyTimeout, getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, getTimeout, isMetaConnectDeliveryOnly, setAdvice, setInterval, setMaxInterval, setMaxLazyTimeout, setMetaConnectDeliveryOnly, setOption, setOptionPrefix, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final String PREFIX
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

PROTOCOL_OPTION

public static final String PROTOCOL_OPTION
See Also:
Constant Field Values

BUFFER_SIZE_OPTION

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

WebSocketTransport

public WebSocketTransport(BayeuxServerImpl bayeux)
Method Detail

init

public void init()
Description copied from class: AbstractServerTransport
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

accept

public boolean accept(javax.servlet.http.HttpServletRequest request)
Specified by:
accept in class HttpTransport

handle

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

checkOrigin

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

getContext

public BayeuxContext getContext()
Specified by:
getContext in interface ServerTransport
Overrides:
getContext in class HttpTransport
See Also:
HttpTransport.getContext()


Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.