org.cometd.server.transport
Class HttpTransport

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

public abstract class HttpTransport
extends AbstractServerTransport

HTTP Transport base class. Used for transports that use HTTP for a transport or to initiate a transport connection.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.cometd.server.AbstractServerTransport
AbstractServerTransport.OneTimeScheduler, AbstractServerTransport.Scheduler
 
Field Summary
static String JSON_DEBUG_OPTION
           
static String 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
protected HttpTransport(BayeuxServerImpl bayeux, String name)
           
 
Method Summary
abstract  boolean accept(javax.servlet.http.HttpServletRequest request)
           
 BayeuxContext getContext()
           
 InetSocketAddress getCurrentLocalAddress()
           
 InetSocketAddress getCurrentRemoteAddress()
           
 javax.servlet.http.HttpServletRequest getCurrentRequest()
           
abstract  void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void init()
          Initialise the transport.
protected  ServerMessage.Mutable[] parseMessages(javax.servlet.http.HttpServletRequest request)
           
 void setCurrentRequest(javax.servlet.http.HttpServletRequest request)
           
 
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

JSON_DEBUG_OPTION

public static final String JSON_DEBUG_OPTION
See Also:
Constant Field Values

MESSAGE_PARAM

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

HttpTransport

protected HttpTransport(BayeuxServerImpl bayeux,
                        String name)
Method Detail

init

protected 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 AbstractServerTransport

accept

public abstract boolean accept(javax.servlet.http.HttpServletRequest request)

handle

public abstract void handle(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws IOException,
                            javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

parseMessages

protected ServerMessage.Mutable[] parseMessages(javax.servlet.http.HttpServletRequest request)
                                         throws IOException,
                                                ParseException
Throws:
IOException
ParseException

setCurrentRequest

public void setCurrentRequest(javax.servlet.http.HttpServletRequest request)

getCurrentRequest

public javax.servlet.http.HttpServletRequest getCurrentRequest()

getCurrentLocalAddress

public InetSocketAddress getCurrentLocalAddress()
See Also:
ServerTransport.getCurrentLocalAddress()

getCurrentRemoteAddress

public InetSocketAddress getCurrentRemoteAddress()
See Also:
ServerTransport.getCurrentRemoteAddress()

getContext

public BayeuxContext getContext()
See Also:
ServerTransport.getContext()


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