Package org.cometd.server.transport
Class AbstractHttpTransport.LongPollScheduler
java.lang.Object
org.cometd.server.transport.AbstractHttpTransport.LongPollScheduler
- All Implemented Interfaces:
Runnable
,EventListener
,javax.servlet.AsyncListener
,AbstractServerTransport.Scheduler
,AbstractHttpTransport.HttpScheduler
- Direct Known Subclasses:
AbstractStreamHttpTransport.DispatchingLongPollScheduler
- Enclosing class:
- AbstractHttpTransport
protected abstract class AbstractHttpTransport.LongPollScheduler extends Object implements Runnable, AbstractHttpTransport.HttpScheduler, javax.servlet.AsyncListener
-
Constructor Summary
Constructors Modifier Constructor Description protected
LongPollScheduler(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.AsyncContext asyncContext, ServerSessionImpl session, ServerMessage.Mutable reply, long timeout)
-
Method Summary
Modifier and Type Method Description void
cancel()
protected abstract void
dispatch()
protected void
error(int code)
javax.servlet.AsyncContext
getAsyncContext()
ServerMessage.Mutable
getMetaConnectReply()
javax.servlet.http.HttpServletRequest
getRequest()
javax.servlet.http.HttpServletResponse
getResponse()
ServerSessionImpl
getServerSession()
void
onComplete(javax.servlet.AsyncEvent asyncEvent)
void
onError(javax.servlet.AsyncEvent event)
void
onStartAsync(javax.servlet.AsyncEvent event)
void
onTimeout(javax.servlet.AsyncEvent event)
void
run()
void
schedule()
-
Constructor Details
-
LongPollScheduler
protected LongPollScheduler(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.AsyncContext asyncContext, ServerSessionImpl session, ServerMessage.Mutable reply, long timeout)
-
-
Method Details
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()- Specified by:
getRequest
in interfaceAbstractHttpTransport.HttpScheduler
-
getResponse
public javax.servlet.http.HttpServletResponse getResponse()- Specified by:
getResponse
in interfaceAbstractHttpTransport.HttpScheduler
-
getAsyncContext
public javax.servlet.AsyncContext getAsyncContext()- Specified by:
getAsyncContext
in interfaceAbstractHttpTransport.HttpScheduler
-
getServerSession
-
getMetaConnectReply
-
schedule
public void schedule()- Specified by:
schedule
in interfaceAbstractServerTransport.Scheduler
-
cancel
public void cancel()- Specified by:
cancel
in interfaceAbstractServerTransport.Scheduler
-
run
public void run() -
onStartAsync
- Specified by:
onStartAsync
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onTimeout
- Specified by:
onTimeout
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onComplete
- Specified by:
onComplete
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
onError
- Specified by:
onError
in interfacejavax.servlet.AsyncListener
- Throws:
IOException
-
dispatch
protected abstract void dispatch() -
error
protected void error(int code)
-