All Packages Class Hierarchy This Package Previous Next Index
Class magician.Node.PortThread
java.lang.Object
|
+----java.lang.Thread
|
+----magician.Node.PortThread
- public class PortThread
- extends Thread
- implements PerfConstants
-
EventMgr
-
-
ipAddress
- physical address of node
-
lastSeqNo
- last seq number transmitted
-
MAX_RETRIES
-
-
outQ
- queue of outgoing packets
-
port
- port number
-
PortName
- name of port being managed
-
pThread
-
-
retries
-
-
speed
-
-
TIMEOUT_PERIOD
- default timeout period
-
timePeriod
-
-
PortThread(Hashtable)
-
-
confirmPacket(int)
- Confirms the receipt of the transmitted packet and removes it from the
retransmit queue.
-
queueForTransmission(int, byte[])
- queues the packet for transmission and retransmits
after timeout if ack is not received
Currently, individual timeout is ignored, only default is used.
-
run()
- sends packet at the front of the queue to
the neighbor
PortName
String PortName
- name of port being managed
ipAddress
String ipAddress
- physical address of node
port
int port
- port number
outQ
HashQueue outQ
- queue of outgoing packets
lastSeqNo
int lastSeqNo
- last seq number transmitted
EventMgr
EventManager EventMgr
pThread
Thread pThread
TIMEOUT_PERIOD
int TIMEOUT_PERIOD
- default timeout period
MAX_RETRIES
static final int MAX_RETRIES
timePeriod
int timePeriod
speed
int speed
retries
int retries
PortThread
public PortThread(Hashtable Port)
queueForTransmission
public void queueForTransmission(int seqNo,
byte packet[])
- queues the packet for transmission and retransmits
after timeout if ack is not received
Currently, individual timeout is ignored, only default is used.
- Parameters:
- seqNo - the assigned sequence number for the packet
- packet - a byte array containing the serialized Smartpacket
- timeout - the timeout interval to use for retransmission
confirmPacket
public synchronized boolean confirmPacket(int seqNo)
- Confirms the receipt of the transmitted packet and removes it from the
retransmit queue.
- Parameters:
- seqNo - the sequence number of the packet being confirmed
- Throws: IndexOutOfBoundsException
- if sequence number is out of order
run
public synchronized void run()
- sends packet at the front of the queue to
the neighbor
- Overrides:
- run in class Thread
All Packages Class Hierarchy This Package Previous Next Index