|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.funambol.push.CTPService.HeartbeatGenerator
protected class CTPService.HeartbeatGenerator
This class implements an hearbeat generator. A thread which is in charge of generating messages for the CTP server to signal that the client is alive. The interval between successive messages is specified in the configuration. The thread sends a message and wait for an answer. The send operation is monitored for timeout. The answer is caught by the main listener thread. The heartbeat generator only checks whether an ok has been received. In this case it consider everything is OK. This is a trick as we do not really monitor the reading with a timeout. We rather expects that the OK arrives before we have to generate a new READY message. This way we simplify the implementation and the behavior seems still reasonable.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
protected |
CTPService.HeartbeatGenerator()
|
Method Summary | |
---|---|
boolean |
isRunning()
Returns true if the heart is beating. |
void |
run()
This is the heart beat main loop. |
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 |
Constructor Detail |
---|
protected CTPService.HeartbeatGenerator()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean isRunning()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |