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

Variable Index

 o EventMgr
 o ipAddress
physical address of node
 o lastSeqNo
last seq number transmitted
 o MAX_RETRIES
 o outQ
queue of outgoing packets
 o port
port number
 o PortName
name of port being managed
 o pThread
 o retries
 o speed
 o TIMEOUT_PERIOD
default timeout period
 o timePeriod

Constructor Index

 o PortThread(Hashtable)

Method Index

 o confirmPacket(int)
Confirms the receipt of the transmitted packet and removes it from the retransmit queue.
 o 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.
 o run()
sends packet at the front of the queue to the neighbor

Variables

 o PortName
 String PortName
name of port being managed

 o ipAddress
 String ipAddress
physical address of node

 o port
 int port
port number

 o outQ
 HashQueue outQ
queue of outgoing packets

 o lastSeqNo
 int lastSeqNo
last seq number transmitted

 o EventMgr
 EventManager EventMgr
 o pThread
 Thread pThread
 o TIMEOUT_PERIOD
 int TIMEOUT_PERIOD
default timeout period

 o MAX_RETRIES
 static final int MAX_RETRIES
 o timePeriod
 int timePeriod
 o speed
 int speed
 o retries
 int retries

Constructors

 o PortThread
 public PortThread(Hashtable Port)

Methods

 o 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
 o 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
 o 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
1