Class LongPollingMgr

java.lang.Object
org.eclnt.jsfserver.polling.LongPollingMgr

public class LongPollingMgr extends Object
Registration of long polling instances that are managed on server side. Long polling instances are registered within the http session context, in order to access them from the long-polling-servlet: LongPollingServlet.
  • Constructor Details

    • LongPollingMgr

      public LongPollingMgr()
  • Method Details

    • add

      public static void add(ILongPolling longPolling)
      Add long polling object so that it is centrally registered with its id - to be later be picked up by a request from browser side, into which the id is encoded as well.
    • remove

      public static void remove(ILongPolling longPolling)
      Please pay attention: thinking about the "remove" is "more important" than thinking about the "add"...! Long polling instances are registered within the session context, as a result the garbage collector will never catch these objects during the lifecycle of a session! The one who adds a long polling object at the same time has to make sure that this instance is removed.

      Otherwise not only some memory will be not cleaned up in a proper way, but also one thread may be kept for a long time!
    • abortAllLongPollingThreadsForSession

      public static void abortAllLongPollingThreadsForSession(javax.servlet.http.HttpSession session)
    • abortAllLongPollingThreadsForSubpageContext

      public static void abortAllLongPollingThreadsForSubpageContext(SubpageContext spc)
    • abortAllLongPollingThreadsForSession

      public static void abortAllLongPollingThreadsForSession()
    • reprocessUnprocessedWakeupsInCurrentDialogSession

      public static void reprocessUnprocessedWakeupsInCurrentDialogSession()
    • reprocessUnprocessedWakeups

      public static void reprocessUnprocessedWakeups(ISessionAbstraction session)
    • notifyLongPollingProcessed

      public static void notifyLongPollingProcessed(String longPollingId, long longPollingWakeupStamp)
      Invoked during processing of action that is triggered by the long polling. The execution of the wake-up is passed back into the long-polling-instance that executed the wake-up.