Package org.eclnt.jsfserver.polling
Interface ILongPolling
- All Known Implementing Classes:
BlockerInfo.BlockerInfoWebSocketPolling,DefaultLongPolling,DefaultLongPolling30API,DefaultLongPollingWebSocket,UNIFIEDPOLLINGBinding.MyLongPolling,UNIFIEDPOLLINGBinding.MyLongPollingWebSocket
public interface ILongPolling
Interface that needs to be implemented by long polling instances.
Please do no directly implement the interface but better create a sub-class
from
DefaultLongPolling.-
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.voidWrites some chunk content into the connection so that the connection is not timed out.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.
-
Method Details
-
getId
String getId() -
getContinuePolling
boolean getContinuePolling() -
getURL
String getURL()URL that is addressed by the long polling component on client side. -
wakeup
void wakeup(boolean continuePolling) 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. -
wakeupForReconnect
void wakeupForReconnect()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. -
abortThread
void abortThread()Abort long polling thread. -
abortThreadWithouContinuingPolling
void abortThreadWithouContinuingPolling()Abort long polling thread - and tell the client that it should not continue to create new poll requests. -
abortThreadWithErrorIfWaiting
void abortThreadWithErrorIfWaiting()Abort long polling thread with error. -
keepAlive
void keepAlive()Writes some chunk content into the connection so that the connection is not timed out. -
getLastResponseTime
long getLastResponseTime()Point of time when a response activity (e.g. wakeup, wakeupForReconnect, ...) was executed.
-