Class DefaultLongPollingComet
java.lang.Object
org.eclnt.jsfserver.polling.comet.DefaultLongPollingComet
- All Implemented Interfaces:
Serializable
,ILongPolling
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Abort long polling thread.void
Abort long polling thread with error.void
Abort long polling thread - and tell the client that it should not continue to create new poll requests.boolean
getId()
long
Point of time when a response activity (e.g. wakeup, wakeupForReconnect, ...)getURL()
URL that is addressed by the long polling component on client side.void
Writes some chunk content into the connection so that the connection is not timed out.boolean
waitForEvent
(javax.servlet.http.HttpServletResponse response, org.apache.catalina.comet.CometEvent event) void
wakeup
(boolean continuePolling) When an event is triggered then the wakeup method is to be called.void
Calling this method will trigger the long polling to pass back a reconnect-signal to the client side.
-
Constructor Details
-
DefaultLongPollingComet
public DefaultLongPollingComet()
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceILongPolling
-
getContinuePolling
public boolean getContinuePolling()- Specified by:
getContinuePolling
in interfaceILongPolling
-
getURL
Description copied from interface:ILongPolling
URL that is addressed by the long polling component on client side.- Specified by:
getURL
in interfaceILongPolling
-
waitForEvent
public boolean waitForEvent(javax.servlet.http.HttpServletResponse response, org.apache.catalina.comet.CometEvent event) -
wakeup
public void wakeup(boolean continuePolling) Description copied from interface:ILongPolling
When an event is triggered then the wakeup method is to be called. This will send the response to the client side. This is the method to be called by your application in order to trigger the response.- Specified by:
wakeup
in interfaceILongPolling
-
wakeupForReconnect
public void wakeupForReconnect()Description copied from interface:ILongPolling
Calling this method will trigger the long polling to pass back a reconnect-signal to the client side. On client side the long polling will rebuild a new connection to the server side and continue the long polling.- Specified by:
wakeupForReconnect
in interfaceILongPolling
-
abortThread
public void abortThread()Description copied from interface:ILongPolling
Abort long polling thread.- Specified by:
abortThread
in interfaceILongPolling
-
abortThreadWithErrorIfWaiting
public void abortThreadWithErrorIfWaiting()Description copied from interface:ILongPolling
Abort long polling thread with error.- Specified by:
abortThreadWithErrorIfWaiting
in interfaceILongPolling
-
abortThreadWithouContinuingPolling
public void abortThreadWithouContinuingPolling()Description copied from interface:ILongPolling
Abort long polling thread - and tell the client that it should not continue to create new poll requests.- Specified by:
abortThreadWithouContinuingPolling
in interfaceILongPolling
-
keepAlive
public void keepAlive()Description copied from interface:ILongPolling
Writes some chunk content into the connection so that the connection is not timed out.- Specified by:
keepAlive
in interfaceILongPolling
-
getLastResponseTime
public long getLastResponseTime()Description copied from interface:ILongPolling
Point of time when a response activity (e.g. wakeup, wakeupForReconnect, ...) was executed.- Specified by:
getLastResponseTime
in interfaceILongPolling
-