|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.dsol.formalisms.devs.AbstractSimEvent
nl.tudelft.simulation.dsol.formalisms.devs.SimEvent
The SimEvent forms the essential scheduling mechanism for D-SOL. Objects do not invoke methods directly on eachother; they bundle the object on which the method is planned to be invoked together with the arguments and the name of the method in a simEvent. The SimEvent is then stored in the eventList and executed.
(c) copyright 2003 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: General Public
License (GPL) , no warranty
| Field Summary | |
protected java.lang.Object[] |
args
args are the arguments which are used to invoke the method with |
protected java.lang.String |
method
method is the method which embodies the state change |
protected java.lang.Object |
source
source reflects the source that created the simevent |
protected java.lang.Object |
target
target reflects the target on which a state change is scheduled |
| Fields inherited from class nl.tudelft.simulation.dsol.formalisms.devs.AbstractSimEvent |
absoluteExecutionTime, id, priority |
| Fields inherited from interface nl.tudelft.simulation.dsol.formalisms.devs.SimEventInterface |
MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY |
| Constructor Summary | |
SimEvent(double executionTime,
java.lang.Object source,
java.lang.Object target,
java.lang.String method,
java.lang.Object[] args)
The constuctor of the event stores the time the event must be executed and the object and method to invoke |
|
SimEvent(double executionTime,
short priority,
java.lang.Object source,
java.lang.Object target,
java.lang.String method,
java.lang.Object[] args)
The constuctor of the event stores the time the event must be executed and the object and method to invoke |
|
| Method Summary | |
void |
execute()
executes the simEvent |
java.lang.Object[] |
getArgs()
|
java.lang.String |
getMethod()
|
java.lang.Object |
getSource()
|
java.lang.Object |
getTarget()
|
java.lang.String |
toString()
|
| Methods inherited from class nl.tudelft.simulation.dsol.formalisms.devs.AbstractSimEvent |
compareTo, getAbsoluteExecutionTime, getID, getPriority, setID |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.Object source
protected java.lang.Object target
protected java.lang.String method
protected java.lang.Object[] args
| Constructor Detail |
public SimEvent(double executionTime,
java.lang.Object source,
java.lang.Object target,
java.lang.String method,
java.lang.Object[] args)
executionTime - reflects the time the event has to be executed.source - reflects the source that created the methodtarget - reflects the object on which the method must be invoked.method - reflects the method to invokeargs - reflects the argumenst the method to invoke with
public SimEvent(double executionTime,
short priority,
java.lang.Object source,
java.lang.Object target,
java.lang.String method,
java.lang.Object[] args)
executionTime - reflects the time the event has to be executed.priority - reflects the priority of the eventsource - reflects the source that created the methodtarget - reflects the object on which the method must be invoked.method - reflects the method to invokeargs - reflects the argumenst the method to invoke with| Method Detail |
public void execute()
throws SimRuntimeException
AbstractSimEvent
execute in interface SimEventInterfaceexecute in class AbstractSimEventSimRuntimeException - on execution failureSimEventInterface.execute()public java.lang.Object[] getArgs()
public java.lang.String getMethod()
public java.lang.Object getSource()
public java.lang.Object getTarget()
public java.lang.String toString()
Object.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||