public class DefaultLongPolling extends java.lang.Object implements ILongPolling, java.io.Serializable
| Constructor and Description |
|---|
DefaultLongPolling() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortThread()
Abort long polling thread.
|
void |
abortThreadWithErrorIfWaiting()
Abort long polling thread with error.
|
void |
abortThreadWithouContinuingPolling()
Abort long polling thread - and tell the client that it should not
continue to create new poll requests.
|
boolean |
getContinuePolling()
If true then after this response a new request from the client will be created
immediately - i.e. the next polling is started immediately.
|
java.lang.String |
getId()
Returns the id under which the buffered content is registered.
|
java.lang.String |
getLongPollingResponse() |
java.lang.String |
getURL()
The URL that can be passed back to client side for accessing the
buffered content.
|
void |
keepAlive()
Writes some chunk content into the connection so that the connection
is not timed out.
|
boolean |
waitForEvent(HttpServletResponse response) |
void |
wakeup(boolean continuePolling)
When an event is triggered then the wakeup method is to be called.
|
void |
wakeupForReconnect()
Calling this method will trigger the long polling to pass back
a reconnect-signal to the client side.
|
public java.lang.String getId()
getId in interface ILongPollingpublic boolean getContinuePolling()
getContinuePolling in interface ILongPollingpublic java.lang.String getURL()
getURL in interface ILongPollingpublic boolean waitForEvent(HttpServletResponse response)
public void wakeup(boolean continuePolling)
ILongPollingwakeup in interface ILongPollingpublic void wakeupForReconnect()
ILongPollingwakeupForReconnect in interface ILongPollingpublic void abortThreadWithouContinuingPolling()
ILongPollingabortThreadWithouContinuingPolling in interface ILongPollingpublic void abortThread()
ILongPollingabortThread in interface ILongPollingpublic void abortThreadWithErrorIfWaiting()
ILongPollingabortThreadWithErrorIfWaiting in interface ILongPollingpublic java.lang.String getLongPollingResponse()
public void keepAlive()
ILongPollingkeepAlive in interface ILongPollingCopyright © CaptainCasa Gmbh. All Rights Reserved.