Package org.eclnt.jsfserver.polling
Class DefaultLongPolling30API
java.lang.Object
org.eclnt.jsfserver.polling.DefaultLongPolling30API
- All Implemented Interfaces:
Serializable,ILongPolling
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAbort long polling thread.voidAbort long polling thread with error.voidAbort long polling thread - and tell the client that it should not continue to create new poll requests.booleangetId()longPoint of time when a response activity (e.g. wakeup, wakeupForReconnect, ...)getURL()URL that is addressed by the long polling component on client side.protected booleanvoidWrites some chunk content into the connection so that the connection is not timed out.booleanwaitForEvent(jakarta.servlet.AsyncContext asyncContext, jakarta.servlet.http.HttpServletResponse response) voidwakeup(boolean continuePolling) When an event is triggered then the wakeup method is to be called.voidCalling this method will trigger the long polling to pass back a reconnect-signal to the client side.
-
Constructor Details
-
DefaultLongPolling30API
public DefaultLongPolling30API()
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceILongPolling
-
getContinuePolling
public boolean getContinuePolling()- Specified by:
getContinuePollingin interfaceILongPolling
-
getURL
Description copied from interface:ILongPollingURL that is addressed by the long polling component on client side.- Specified by:
getURLin interfaceILongPolling
-
waitForEvent
public boolean waitForEvent(jakarta.servlet.AsyncContext asyncContext, jakarta.servlet.http.HttpServletResponse response) -
isWaitingForEvent
protected boolean isWaitingForEvent() -
wakeup
public void wakeup(boolean continuePolling) Description copied from interface:ILongPollingWhen 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:
wakeupin interfaceILongPolling
-
wakeupForReconnect
public void wakeupForReconnect()Description copied from interface:ILongPollingCalling 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:
wakeupForReconnectin interfaceILongPolling
-
abortThread
public void abortThread()Description copied from interface:ILongPollingAbort long polling thread.- Specified by:
abortThreadin interfaceILongPolling
-
abortThreadWithErrorIfWaiting
public void abortThreadWithErrorIfWaiting()Description copied from interface:ILongPollingAbort long polling thread with error.- Specified by:
abortThreadWithErrorIfWaitingin interfaceILongPolling
-
abortThreadWithouContinuingPolling
public void abortThreadWithouContinuingPolling()Description copied from interface:ILongPollingAbort long polling thread - and tell the client that it should not continue to create new poll requests.- Specified by:
abortThreadWithouContinuingPollingin interfaceILongPolling
-
keepAlive
public void keepAlive()Description copied from interface:ILongPollingWrites some chunk content into the connection so that the connection is not timed out.- Specified by:
keepAlivein interfaceILongPolling
-
getLastResponseTime
public long getLastResponseTime()Description copied from interface:ILongPollingPoint of time when a response activity (e.g. wakeup, wakeupForReconnect, ...) was executed.- Specified by:
getLastResponseTimein interfaceILongPolling
-