Package org.eclnt.jsfserver.polling
Class LongPollingMgr
java.lang.Object
org.eclnt.jsfserver.polling.LongPollingMgr
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
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
abortAllLongPollingThreadsForSession
(javax.servlet.http.HttpSession session) static void
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.static void
notifyLongPollingProcessed
(String longPollingId, long longPollingWakeupStamp) Invoked during processing of action that is triggered by the long polling.static void
remove
(ILongPolling longPolling) Please pay attention: thinking about the "remove" is "more important" than thinking about the "add"...!static void
static void
-
Constructor Details
-
LongPollingMgr
public LongPollingMgr()
-
-
Method Details
-
add
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
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
-
abortAllLongPollingThreadsForSession
public static void abortAllLongPollingThreadsForSession() -
reprocessUnprocessedWakeupsInCurrentDialogSession
public static void reprocessUnprocessedWakeupsInCurrentDialogSession() -
reprocessUnprocessedWakeups
-
notifyLongPollingProcessed
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.
-