|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.xmlBlaster.protocol.http.HttpPushHandler.HttpPingThread
private class 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
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 | |
---|---|
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, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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 onlyMethod Detail |
---|
public void pong()
public void stopThread()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |