Package org.cometd.server
Interface AbstractServerTransport.Scheduler
-
- All Known Subinterfaces:
AbstractHttpTransport.HttpScheduler
- All Known Implementing Classes:
AbstractHttpTransport.LongPollScheduler,AbstractServerTransport.Scheduler.None,AbstractStreamHttpTransport.DispatchingLongPollScheduler
- Enclosing class:
- AbstractServerTransport
public static interface AbstractServerTransport.SchedulerPerforms server-to-client transport operations when a
/meta/connectmessage is held and a server-side message is published.HTTP transports can only perform server-to-client sends if there is an outstanding
/meta/connect, or if they are processing incoming messages.WebSocket transports, on the other hand, can perform server-to-client sends even if there is no outstanding
/meta/connect.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAbstractServerTransport.Scheduler.NoneA scheduler that does not perform any operation but remembers the/meta/connectcycle.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidcancel()Invoked when the transport wants to cancel scheduled operations that will trigger when the /meta/connect timeout fires.default voidcancel(java.lang.Throwable cause)Invoked when the transport wants to cancel with the given cause scheduled operations that will trigger when the /meta/connect timeout fires.default voiddestroy()Invoked when the transport wants to abort communication.default ServerMessage.MutablegetMessage()default longgetMetaConnectCycle()default voidschedule()Invoked when the transport wants to send queued messages, and possibly a /meta/connect reply.
-
-
-
Method Detail
-
getMessage
default ServerMessage.Mutable getMessage()
- Returns:
- the message associated with this scheduler.
-
getMetaConnectCycle
default long getMetaConnectCycle()
- Returns:
- the cycle number for suspended
/meta/connects.
-
schedule
default void schedule()
Invoked when the transport wants to send queued messages, and possibly a /meta/connect reply.
-
cancel
default void cancel()
Invoked when the transport wants to cancel scheduled operations that will trigger when the /meta/connect timeout fires.
-
cancel
default void cancel(java.lang.Throwable cause)
Invoked when the transport wants to cancel with the given cause scheduled operations that will trigger when the /meta/connect timeout fires.
-
destroy
default void destroy()
Invoked when the transport wants to abort communication.
-
-