org.eclnt.jsfserver.polling

## Class LongPollingMgr

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

-     public class LongPollingMgr
      extends java.lang.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`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LongPollingMgr.MyHttpSessionClosedReactor`
    `static class` | `LongPollingMgr.MySubpageContextClosedReactor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LongPollingMgr()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `abortAllLongPollingThreadsForSession()`
    `static void` | `abortAllLongPollingThreadsForSession(HttpSession session)`
    `static void` | `abortAllLongPollingThreadsForSubpageContext(SubpageContext spc)`
    `static void` | `add(ILongPolling longPolling)`
    `static void` | `remove(ILongPolling longPolling)` Please pay attention: thinking about the "remove" is "more important" than thinking about the "add"...!

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LongPollingMgr

          public LongPollingMgr()

  - ### Method Detail

    - #### add

          public static void add(ILongPolling longPolling)

    - #### 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(HttpSession session)

    - #### abortAllLongPollingThreadsForSubpageContext

          public static void abortAllLongPollingThreadsForSubpageContext(SubpageContext spc)

    - #### abortAllLongPollingThreadsForSession

          public static void abortAllLongPollingThreadsForSession()

Copyright © CaptainCasa Gmbh. All Rights Reserved.