transport
Class Unicast

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--transport.Unicast
All Implemented Interfaces:
java.lang.Runnable

public class Unicast
extends java.lang.Thread

This class is used for Unicasting a message to one user in wireless range. It adds in timing delays based on ratio of max range/distance to simulate bandwidth loss and delay due to wireless signal degradation.


Field Summary
private  transport.protocol.UnicastMessage msg
          The message to send in this thread.
private  java.util.Vector points
          The list of all access points in the simulation.
private  java.util.Vector users
          The list of all users in the simulation.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Unicast(java.util.Vector users, java.util.Vector points, transport.protocol.UnicastMessage msg)
          This Costructor preps the Thread for the given message to send.
 
Method Summary
 void run()
          This method excutes the thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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
 

Field Detail

msg

private transport.protocol.UnicastMessage msg
The message to send in this thread.


points

private java.util.Vector points
The list of all access points in the simulation.


users

private java.util.Vector users
The list of all users in the simulation.

Constructor Detail

Unicast

public Unicast(java.util.Vector users,
               java.util.Vector points,
               transport.protocol.UnicastMessage msg)
This Costructor preps the Thread for the given message to send.

Parameters:
msg - The message to send to other users in range.
Method Detail

run

public void run()
This method excutes the thread. It sends the message to one Users in range, adds a delay, and sends to the Users if it can be reached in a number of hops specified by the message.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread