public abstract class HttpTransport extends AbstractServerTransport
HTTP ServerTransport base class, used by ServerTransports that use HTTP as transport or to initiate a transport connection.
AbstractServerTransport.OneTimeScheduler, AbstractServerTransport.Scheduler| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
_logger |
static String |
ALLOW_MULTI_SESSIONS_NO_BROWSER_OPTION |
static String |
AUTOBATCH_OPTION |
static String |
BROWSER_COOKIE_DOMAIN_OPTION |
static String |
BROWSER_COOKIE_NAME_OPTION |
static String |
BROWSER_COOKIE_PATH_OPTION |
static String |
JSON_DEBUG_OPTION |
static String |
MAX_SESSIONS_PER_BROWSER_OPTION |
static String |
MESSAGE_PARAM |
static String |
MULTI_SESSION_INTERVAL_OPTION |
static String |
PREFIX |
INTERVAL_OPTION, JSON_CONTEXT_OPTION, MAX_INTERVAL_OPTION, MAX_LAZY_TIMEOUT_OPTION, MAX_QUEUE_OPTION, META_CONNECT_DELIVERY_OPTION, TIMEOUT_OPTION| Modifier | Constructor and Description |
|---|---|
protected |
HttpTransport(BayeuxServerImpl bayeux,
String name) |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
accept(javax.servlet.http.HttpServletRequest request) |
protected ServerMessage.Mutable |
bayeuxServerHandle(ServerSessionImpl session,
ServerMessage.Mutable message) |
protected void |
decBrowserId(String browserId,
ServerSession session) |
protected String |
findBrowserId(javax.servlet.http.HttpServletRequest request) |
BayeuxContext |
getContext() |
javax.servlet.http.HttpServletRequest |
getCurrentRequest() |
protected long |
getMultiSessionInterval() |
abstract void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleJSONParseException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String json,
Throwable exception) |
protected boolean |
incBrowserId(String browserId,
ServerSession session)
Increment the browser ID count.
|
protected void |
init()
Initialise the transport, resolving default and direct options.
|
protected boolean |
isAllowMultiSessionsNoBrowser() |
protected boolean |
isAutoBatch() |
protected void |
metaConnectResumed(javax.servlet.AsyncContext asyncContext,
ServerSession session) |
protected void |
metaConnectSuspended(javax.servlet.AsyncContext asyncContext,
ServerSession session) |
protected String |
setBrowserId(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setCurrentRequest(javax.servlet.http.HttpServletRequest request) |
protected void |
sweep()
Sweeps the transport for old Browser IDs
|
destroy, getAdvice, getBayeux, getInterval, getMaxInterval, getMaxLazyTimeout, getTimeout, isMetaConnectDeliveryOnly, parseMessages, parseMessages, setAdvice, setInterval, setMaxInterval, setMaxLazyTimeout, setMetaConnectDeliveryOnly, setTimeoutgetName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefixclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getOption, getOptionNames, getOptionPrefixpublic static final String PREFIX
public static final String JSON_DEBUG_OPTION
public static final String MESSAGE_PARAM
public static final String BROWSER_COOKIE_NAME_OPTION
public static final String BROWSER_COOKIE_DOMAIN_OPTION
public static final String BROWSER_COOKIE_PATH_OPTION
public static final String MAX_SESSIONS_PER_BROWSER_OPTION
public static final String MULTI_SESSION_INTERVAL_OPTION
public static final String AUTOBATCH_OPTION
public static final String ALLOW_MULTI_SESSIONS_NO_BROWSER_OPTION
protected final org.slf4j.Logger _logger
protected HttpTransport(BayeuxServerImpl bayeux, String name)
protected void init()
AbstractServerTransportinit in class AbstractServerTransportpublic abstract boolean accept(javax.servlet.http.HttpServletRequest request)
public abstract void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionprotected long getMultiSessionInterval()
protected boolean isAutoBatch()
protected boolean isAllowMultiSessionsNoBrowser()
public void setCurrentRequest(javax.servlet.http.HttpServletRequest request)
public javax.servlet.http.HttpServletRequest getCurrentRequest()
public BayeuxContext getContext()
protected String findBrowserId(javax.servlet.http.HttpServletRequest request)
protected String setBrowserId(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected boolean incBrowserId(String browserId, ServerSession session)
browserId - the browser ID to increment the count forsession - the session that cause the browser ID incrementprotected void decBrowserId(String browserId, ServerSession session)
protected void handleJSONParseException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String json,
Throwable exception)
throws IOException
IOExceptionprotected ServerMessage.Mutable bayeuxServerHandle(ServerSessionImpl session, ServerMessage.Mutable message)
protected void metaConnectSuspended(javax.servlet.AsyncContext asyncContext,
ServerSession session)
protected void metaConnectResumed(javax.servlet.AsyncContext asyncContext,
ServerSession session)
protected void sweep()
sweep in class AbstractServerTransportCopyright © 2008–2014 Dojo Foundation. All rights reserved.