jsim.process
Class Signal

java.lang.Object
  extended by jsim.process.DynamicNode
      extended by jsim.process.Signal
All Implemented Interfaces:
java.lang.Runnable

public class Signal
extends DynamicNode
implements java.lang.Runnable

The Signal class allows resource capacity to be altered via signals. A Signal object can affect the behavior of servers, by alternatively, increasing or decreasing the number of tokens (service units).


Field Summary
 
Fields inherited from class jsim.process.DynamicNode
costs, duration, occupancy, outgoing, props, trc
 
Constructor Summary
Signal(int id, Prop props, Server serverList, Transport[] outgoing, AnimationQueue sharedQueue)
          Constructs a Signal to control the operation of Servers.
Signal(Prop props, Server serverList, Transport[] outgoing)
          Constructs a Signal to control the operation of Servers.
 
Method Summary
 boolean getStopped()
          This method returns the status of the Signal.
 void run()
          The run method of Signal.
 void start()
          This method starts the Signal thread.
 void stop()
          This method stops the Signal thread.
 
Methods inherited from class jsim.process.DynamicNode
getNodeStats, getOutgoing, getProps, setBatchProperties, setPrimary, setProps
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Signal

public Signal(Prop props,
              Server serverList,
              Transport[] outgoing)
Constructs a Signal to control the operation of Servers. This constructor has sufficient information to draw the node and its outgoing edges.

Parameters:
property - properties of node
serverList - list of affected servers
outgoing - outgoing transports

Signal

public Signal(int id,
              Prop props,
              Server serverList,
              Transport[] outgoing,
              AnimationQueue sharedQueue)
Constructs a Signal to control the operation of Servers. This constructor has sufficient information to draw the node and its outgoing edges.

Parameters:
property - properties of node
serverList - list of affected servers
outgoing - outgoing transports
Method Detail

start

public void start()
This method starts the Signal thread.


stop

public void stop()
This method stops the Signal thread.


getStopped

public boolean getStopped()
This method returns the status of the Signal.

Returns:
boolean whether this signal is stopped

run

public void run()
The run method of Signal. This determines the lifetime of the Signal and the signaling cycles.

Specified by:
run in interface java.lang.Runnable