simnet
Class BandwidthTest.BWTThread

java.lang.Object
  extended byjava.lang.Thread
      extended bysimnet.BandwidthTest.BWTThread
All Implemented Interfaces:
PlugoutListener, java.lang.Runnable
Enclosing class:
BandwidthTest

class BandwidthTest.BWTThread
extends java.lang.Thread
implements PlugoutListener

A worker thread to send test or probe packets.


Field Summary
static int BWT_SERVER_ID
          The id used for plugout notifications (randomly chosen to avoid conflicts).
(package private)  int dest_ip
           
(package private)  java.lang.String param
           
(package private)  int period
           
(package private)  int round
           
(package private)  long stop_time
           
(package private)  DatagramSocket tx_sock
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BandwidthTest.BWTThread(int dest_ip, int period, int duration, java.lang.String param)
          Create a new thread to run a bandwidth test in.
 
Method Summary
 void plugoutNotification(int id, java.lang.Object replacement, java.lang.Object[] args)
          When our server gets closed, we can stop running.
 void run()
          Send out packets, either at a fixed or random rate, for the specified duration.
 
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

BWT_SERVER_ID

public static final int BWT_SERVER_ID
The id used for plugout notifications (randomly chosen to avoid conflicts).

See Also:
Constant Field Values

round

int round

dest_ip

int dest_ip

period

int period

param

java.lang.String param

stop_time

long stop_time

tx_sock

DatagramSocket tx_sock
Constructor Detail

BandwidthTest.BWTThread

public BandwidthTest.BWTThread(int dest_ip,
                               int period,
                               int duration,
                               java.lang.String param)
Create a new thread to run a bandwidth test in.

Method Detail

run

public void run()
Send out packets, either at a fixed or random rate, for the specified duration.

Specified by:
run in interface java.lang.Runnable

plugoutNotification

public void plugoutNotification(int id,
                                java.lang.Object replacement,
                                java.lang.Object[] args)
When our server gets closed, we can stop running.

Specified by:
plugoutNotification in interface PlugoutListener
Parameters:
id - The id passed to registerPlugoutNotification
replacement - the object that will be replacing the object that is being plugged out. It will be null if the object is getting plugged out, rather then being replaced with a new plugin.
args - were the args passed to registerPlugoutNotification