|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectRDTTimer
public abstract class RDTTimer
An RDTTimer schedules a timeout task for a packet to be executed in the future. It allows the scheduling time for the task to be changed to a later time and it also allows the scheduling time to cancelled. Thus an RDTTimer can be reused as many times as necessary.
When constructed, an RDTTimer is provided with a delay and a task.
These are normally set by a TCPEntity.
Before it is used is should be given a packet by invoking setPacket().
This packet is made available when the timer fires.
A null value can be used for the packet if only one
timer is used by a protocol.
When the current time is equal to its scheduling time, an RDTTimer
schedules its task.
Its packet is used as the parameter for its task's
doTask() method.
When constructed, a RDTTimer has no scheduling time. It can be given a scheduling time by sending it a start() message, which sets the scheduling time to the current time plus its delay. The scheduling time can be cancelled by sending it a stop() message.
| Constructor Summary | |
|---|---|
RDTTimer()
|
|
| Method Summary | |
|---|---|
Packet |
getPacket()
tmr.getPacket() returns the packet that tmr times acknowlegements for. |
void |
setPacket(Packet pkt)
tmr.setPacket(pkt) sets the packet that tmr times acknowlegements for to pkt. |
abstract void |
start()
tmr.start() sets the scheduling time for tmr to the current time plus tmr's delay. |
abstract void |
start(long del)
tmr.start(del) sets the scheduling time for tmr to the current time plus del. |
abstract void |
stop()
tmr.stop() cancels tmr's scheduling time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RDTTimer()
| Method Detail |
|---|
public Packet getPacket()
public void setPacket(Packet pkt)
public abstract void start()
public abstract void start(long del)
public abstract void stop()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||