org.mitre.sim.api3
Class PeriodicEntity

java.lang.Object
  extended byorg.mitre.sim.api3.flow.threads.ThreadData
      extended byorg.mitre.sim.api3.exec.LogicalProcess
          extended byorg.mitre.sim.api3.Entity
              extended byorg.mitre.sim.api3.PeriodicEntity
All Implemented Interfaces:
java.lang.Runnable

public class PeriodicEntity
extends Entity

Used to generate SimEvents at a specifed simulation time interval.


Copyright © 2003-2004 The MITRE Corporation


Field Summary
 
Fields inherited from class org.mitre.sim.api3.flow.threads.ThreadData
elaborated, launched, stop, thread
 
Constructor Summary
PeriodicEntity(double period)
          Instance produces an event stream with the specified period.
PeriodicEntity(double period, java.lang.String myName)
          Named instance produces an event stream with the specified period.
 
Method Summary
 void addSimEventListener(SimEventListener sel)
          Begin supplying events to the specified listener.
 void agenda()
          Event generation and dissemination mechanism.
 void removeSimEventListener(SimEventListener sel)
          Stop supplying events to the specified listener.
 
Methods inherited from class org.mitre.sim.api3.Entity
actionMethodNotifier, createPopulation, displayEntities, entityComplete, entityIsAlive, exceptionHandler, getLogger, getName, getTimeLast, getTimeNow, info, msg, register, schedule, schedule, setTimeLast, stopSimulation, toString, waitForAction, waitForActionOrTrigger, waitForActionOrTrigger, waitForActionOrTrigger, waitForTime
 
Methods inherited from class org.mitre.sim.api3.exec.LogicalProcess
getActionOccurred, getCurrentTriggers, getExec, getExecutive, getNextTime, getSelectedTrigger, getState, getTriggerOccurred, isWaiting, run, setActionOccurred, setCurrentTriggers, setExecutive, setLogger, setNextTime, setSelectedTrigger, setState, setTriggerOccurred, stateEquals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PeriodicEntity

public PeriodicEntity(double period)
Instance produces an event stream with the specified period. To be effective, the new instance must be registered with the simulation executive. The names of entities created with this methods are "PeriodicEntity X" where X is the period of the entity.

Parameters:
period - Amount of simulation time between events.
See Also:
Entity.Entity(String), Simulation.register(Entity), Entity.register(Entity)

PeriodicEntity

public PeriodicEntity(double period,
                      java.lang.String myName)
Named instance produces an event stream with the specified period. To be effective, the new instance must be registered with the simulation executive. Entity names are for developer convenience, are not examined by the executive, and need not be unique. Names are used to annotate messages generated by methods msg and toString.

Parameters:
period - Amount of simulation time between events.
myName - Any string value that is useful to identity this entity.
See Also:
Entity.Entity(String), Simulation.register(Entity), Entity.register(Entity)
Method Detail

addSimEventListener

public final void addSimEventListener(SimEventListener sel)
Begin supplying events to the specified listener.

Parameters:
sel - Listener to be added.

removeSimEventListener

public final void removeSimEventListener(SimEventListener sel)
Stop supplying events to the specified listener.

Parameters:
sel - Listener to be removed.

agenda

public final void agenda()
Event generation and dissemination mechanism.

Overrides:
agenda in class Entity