public abstract class LongPollingTransport extends HttpTransport
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_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 void |
decBrowserId(String browserId) |
protected String |
findBrowserId(javax.servlet.http.HttpServletRequest request) |
protected abstract void |
finishWrite(PrintWriter writer,
ServerSessionImpl session) |
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 abstract ServerMessage.Mutable[] |
parseMessages(javax.servlet.http.HttpServletRequest request) |
protected ServerMessage.Mutable[] |
parseMessages(String[] requestParameters) |
protected String |
setBrowserId(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
sweep()
Sweep the transport for old Browser IDs
|
protected abstract PrintWriter |
writeMessage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
PrintWriter writer,
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 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 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).protected abstract PrintWriter writeMessage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, PrintWriter writer, ServerSessionImpl session, ServerMessage message) throws IOException
IOExceptionprotected abstract void finishWrite(PrintWriter writer, ServerSessionImpl session) throws IOException
IOExceptionCopyright © 2008-2013 Dojo Foundation. All Rights Reserved.