|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
com.funambol.push.CTPService.ConnectionTimer
protected class CTPService.ConnectionTimer
This class is used (with a Timer) to monitor a connection and interrupt it if it hangs for more than command timeout. For each IO operation to be monitored, one such object must be created. The client is responsible for notifying when the operation is terminated. If by the time the alarm is triggered, the operation is not terminated, then such an operation is considered timeout and closeConnection is invoked. This will cause exceptions in any hanging read/write, allowing each thread to resume execution.
Constructor Summary | |
---|---|
CTPService.ConnectionTimer()
Constructor. |
Method Summary | |
---|---|
void |
endOperation()
Notifies the ConnectionTimer that the IO operation has terminated. |
int |
getDelay()
Returns the delay for this task |
void |
run()
This method is invoked when the alarm expires. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CTPService.ConnectionTimer()
Method Detail |
---|
public void endOperation()
public int getDelay()
public void run()
run
in interface java.lang.Runnable
run
in class java.util.TimerTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |