|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Thread
org.xmlBlaster.protocol.http.HttpPushHandler.HttpPingThread
Ping the browser, to avoid that the web server or the browser closes the http connection after a vendor specific timeout.
Note that the ping sends some bytes as well, the netscape browser for example closes the http connection if the amount of bytes per second falls below a certain level. The browser responses with 'pong' which allows us to check if the browser is still here.
| Field Summary | |
private long |
counter
|
private long |
PING_INTERVAL
|
private boolean |
pingRunning
|
private HttpPushHandler |
pushHandler
|
private int |
waitForPong
We wait for a browser response (pong) after out ping |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
(package private) |
HttpPushHandler.HttpPingThread(HttpPushHandler pushHandler,
long pingInterval,
java.lang.String loginName)
|
| Method Summary | |
void |
pong()
Response from the browser on our ping. |
void |
run()
|
void |
stopThread()
|
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private HttpPushHandler pushHandler
private final long PING_INTERVAL
private boolean pingRunning
private int waitForPong
private long counter
| Constructor Detail |
HttpPushHandler.HttpPingThread(HttpPushHandler pushHandler,
long pingInterval,
java.lang.String loginName)
pingInterval - How many milli seconds sleeping between the pingsloginName - For debugging only| Method Detail |
public void pong()
public void stopThread()
public void run()
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||