java.lang.Object
org.cometd.server.http.AbstractHttpScheduler
- All Implemented Interfaces:
Runnable
,AbstractServerTransport.Scheduler
,AbstractHttpTransport.HttpScheduler
public abstract class AbstractHttpScheduler
extends Object
implements Runnable, AbstractHttpTransport.HttpScheduler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cometd.server.AbstractServerTransport.Scheduler
AbstractServerTransport.Scheduler.None
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractHttpScheduler
(AbstractHttpTransport transport, TransportContext context, org.cometd.bayeux.Promise<Void> promise, ServerMessage.Mutable message, long timeout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Invoked when the transport wants to cancel scheduled operations that will trigger when the /meta/connect timeout fires.void
destroy()
Invoked when the transport wants to abort communication.protected abstract void
dispatch
(boolean timeout) protected void
long
org.cometd.bayeux.Promise
<Void> void
run()
void
schedule()
Invoked when the transport wants to send queued messages, and possibly a /meta/connect reply.toString()
-
Constructor Details
-
AbstractHttpScheduler
protected AbstractHttpScheduler(AbstractHttpTransport transport, TransportContext context, org.cometd.bayeux.Promise<Void> promise, ServerMessage.Mutable message, long timeout)
-
-
Method Details
-
getContext
-
getPromise
-
getMessage
- Specified by:
getMessage
in interfaceAbstractServerTransport.Scheduler
- Returns:
- the message associated with this scheduler.
-
getMetaConnectCycle
public long getMetaConnectCycle()- Specified by:
getMetaConnectCycle
in interfaceAbstractServerTransport.Scheduler
- Returns:
- the cycle number for suspended
/meta/connect
s.
-
schedule
public void schedule()Description copied from interface:AbstractServerTransport.Scheduler
Invoked when the transport wants to send queued messages, and possibly a /meta/connect reply.- Specified by:
schedule
in interfaceAbstractServerTransport.Scheduler
-
cancel
public void cancel()Description copied from interface:AbstractServerTransport.Scheduler
Invoked when the transport wants to cancel scheduled operations that will trigger when the /meta/connect timeout fires.- Specified by:
cancel
in interfaceAbstractServerTransport.Scheduler
-
destroy
public void destroy()Description copied from interface:AbstractServerTransport.Scheduler
Invoked when the transport wants to abort communication.- Specified by:
destroy
in interfaceAbstractServerTransport.Scheduler
-
run
-
dispatch
protected abstract void dispatch(boolean timeout) -
error
-
toString
-