Class AbstractHttpTransport.LongPollScheduler

java.lang.Object
org.cometd.server.http.AbstractHttpTransport.LongPollScheduler
All Implemented Interfaces:
jakarta.servlet.AsyncListener, java.lang.Runnable, java.util.EventListener, AbstractServerTransport.Scheduler, AbstractHttpTransport.HttpScheduler
Direct Known Subclasses:
AbstractStreamHttpTransport.DispatchingLongPollScheduler
Enclosing class:
AbstractHttpTransport

protected abstract class AbstractHttpTransport.LongPollScheduler
extends java.lang.Object
implements java.lang.Runnable, AbstractHttpTransport.HttpScheduler, jakarta.servlet.AsyncListener
  • Constructor Details

  • Method Details

    • getContext

      public AbstractHttpTransport.Context getContext()
    • getPromise

      public Promise<java.lang.Void> getPromise()
    • getMessage

      public ServerMessage.Mutable getMessage()
      Specified by:
      getMessage in interface AbstractHttpTransport.HttpScheduler
    • getMetaConnectCycle

      public long getMetaConnectCycle()
      Specified by:
      getMetaConnectCycle in interface AbstractServerTransport.Scheduler
      Returns:
      the cycle number for suspended /meta/connects.
    • 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 interface AbstractServerTransport.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 interface AbstractServerTransport.Scheduler
    • destroy

      public void destroy()
      Description copied from interface: AbstractServerTransport.Scheduler
      Invoked when the transport wants to abort communication.
      Specified by:
      destroy in interface AbstractServerTransport.Scheduler
    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable
    • onStartAsync

      public void onStartAsync​(jakarta.servlet.AsyncEvent event)
      Specified by:
      onStartAsync in interface jakarta.servlet.AsyncListener
    • onTimeout

      public void onTimeout​(jakarta.servlet.AsyncEvent event)
      Specified by:
      onTimeout in interface jakarta.servlet.AsyncListener
    • onComplete

      public void onComplete​(jakarta.servlet.AsyncEvent asyncEvent) throws java.io.IOException
      Specified by:
      onComplete in interface jakarta.servlet.AsyncListener
      Throws:
      java.io.IOException
    • onError

      public void onError​(jakarta.servlet.AsyncEvent event)
      Specified by:
      onError in interface jakarta.servlet.AsyncListener
    • dispatch

      protected abstract void dispatch​(boolean timeout)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object