controller
Class Controller.MessageSender

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--controller.Controller.MessageSender
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Controller

class Controller.MessageSender
extends java.lang.Thread

This class is used for Multicasting a message to all users 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.MulticastMessage msg
          The message to send in this thread.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Controller.MessageSender(transport.protocol.MulticastMessage 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.MulticastMessage msg
The message to send in this thread.

Constructor Detail

Controller.MessageSender

public Controller.MessageSender(transport.protocol.MulticastMessage 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 all Users in range, adds a delay, and sends to Users that 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