public abstract class LongPollingTransport extends HttpTransport
| Modifier and Type | Class and Description |
|---|---|
protected class |
LongPollingTransport.LongPollScheduler |
AbstractServerTransport.OneTimeScheduler, AbstractServerTransport.Scheduler| Modifier and Type | Field and Description |
|---|---|
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 |
BROWSER_ID_OPTION |
static String |
MAX_SESSIONS_PER_BROWSER_OPTION |
static String |
MULTI_SESSION_INTERVAL_OPTION |
static String |
PREFIX |
JSON_DEBUG_OPTION, MESSAGE_PARAMINTERVAL_OPTION, MAX_INTERVAL_OPTION, MAX_LAZY_TIMEOUT_OPTION, MAX_QUEUE_OPTION, META_CONNECT_DELIVERY_OPTION, RANDOMIZE_LAZY_TIMEOUT_OPTION, TIMEOUT_OPTION| Modifier | Constructor and Description |
|---|---|
protected |
LongPollingTransport(BayeuxServerImpl bayeux,
String name) |
| Modifier and Type | Method and Description |
|---|---|
protected ServerMessage.Mutable |
bayeuxServerHandle(ServerSessionImpl session,
ServerMessage.Mutable message) |
protected abstract javax.servlet.ServletOutputStream |
beginWrite(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session) |
protected void |
decBrowserId(String browserId) |
protected abstract void |
endWrite(javax.servlet.ServletOutputStream output,
ServerSessionImpl session) |
protected String |
findBrowserId(javax.servlet.http.HttpServletRequest request) |
protected void |
flush(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
boolean startInterval,
ServerMessage.Mutable... replies) |
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)
Increment the browser ID count.
|
protected void |
init()
Initialise the transport, resolving default and direct options.
|
protected abstract boolean |
isAlwaysFlushingAfterHandle() |
protected void |
metaConnectResumed(javax.servlet.http.HttpServletRequest request,
ServerSession session) |
protected void |
metaConnectSuspended(javax.servlet.http.HttpServletRequest request,
ServerSession session,
long timeout) |
protected LongPollingTransport.LongPollScheduler |
newLongPollScheduler(ServerSessionImpl session,
org.eclipse.jetty.continuation.Continuation continuation,
ServerMessage.Mutable metaConnectReply,
String browserId) |
protected abstract ServerMessage.Mutable[] |
parseMessages(javax.servlet.http.HttpServletRequest request) |
protected ServerMessage.Mutable[] |
parseMessages(String[] requestParameters) |
protected void |
processMessages(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerMessage.Mutable[] messages) |
protected ServerMessage.Mutable |
processMetaConnect(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
ServerMessage.Mutable message) |
protected ServerMessage.Mutable |
processMetaHandshake(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
ServerMessage.Mutable message) |
protected ServerMessage.Mutable |
processReply(ServerSessionImpl session,
ServerMessage.Mutable reply) |
protected void |
resume(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
ServerMessage.Mutable reply) |
protected String |
setBrowserId(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
sweep()
Sweep the transport for old Browser IDs
|
protected void |
write(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
boolean startInterval,
List<ServerMessage> messages,
ServerMessage.Mutable[] replies) |
protected void |
writeMessage(javax.servlet.ServletOutputStream output,
ServerSessionImpl session,
ServerMessage message) |
accept, getContext, getCurrentRequest, setCurrentRequestdebug, 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 BROWSER_ID_OPTION
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 LongPollingTransport(BayeuxServerImpl bayeux, String name)
protected void init()
AbstractServerTransportinit in class AbstractServerTransportprotected 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)
browserId - the browser ID to increment the count forprotected void decBrowserId(String browserId)
public void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
handle in class HttpTransportIOExceptionjavax.servlet.ServletExceptionprotected void processMessages(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerMessage.Mutable[] messages)
throws IOException
IOExceptionprotected ServerMessage.Mutable processMetaHandshake(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServerSessionImpl session, ServerMessage.Mutable message)
protected ServerMessage.Mutable processMetaConnect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ServerSessionImpl session, ServerMessage.Mutable message)
protected ServerMessage.Mutable processReply(ServerSessionImpl session, ServerMessage.Mutable reply)
protected void resume(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
ServerMessage.Mutable reply)
protected void flush(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
boolean startInterval,
ServerMessage.Mutable... replies)
protected void write(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session,
boolean startInterval,
List<ServerMessage> messages,
ServerMessage.Mutable[] replies)
protected void writeMessage(javax.servlet.ServletOutputStream output,
ServerSessionImpl session,
ServerMessage message)
throws IOException
IOExceptionprotected abstract javax.servlet.ServletOutputStream beginWrite(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ServerSessionImpl session)
throws IOException
IOExceptionprotected abstract void endWrite(javax.servlet.ServletOutputStream output,
ServerSessionImpl session)
throws IOException
IOExceptionprotected LongPollingTransport.LongPollScheduler newLongPollScheduler(ServerSessionImpl session, org.eclipse.jetty.continuation.Continuation continuation, ServerMessage.Mutable metaConnectReply, String browserId)
protected ServerMessage.Mutable bayeuxServerHandle(ServerSessionImpl session, ServerMessage.Mutable message)
protected void metaConnectSuspended(javax.servlet.http.HttpServletRequest request,
ServerSession session,
long timeout)
protected void metaConnectResumed(javax.servlet.http.HttpServletRequest request,
ServerSession session)
protected void handleJSONParseException(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String json,
Throwable exception)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletExceptionIOExceptionprotected void sweep()
sweep in class AbstractServerTransportAbstractServerTransport.sweep()protected ServerMessage.Mutable[] parseMessages(String[] requestParameters) throws IOException, ParseException
IOExceptionParseExceptionprotected abstract ServerMessage.Mutable[] parseMessages(javax.servlet.http.HttpServletRequest request) throws IOException, ParseException
IOExceptionParseExceptionprotected abstract boolean isAlwaysFlushingAfterHandle()
handle(HttpServletRequest, HttpServletResponse).Copyright © 2008–2014 Dojo Foundation. All rights reserved.