public interface Executable extends Initializable
Green (davisj) |
Green (eal) |
Modifier and Type | Field and Description |
---|---|
static int |
COMPLETED
An indicator that the iterate() method completed successfully.
|
static int |
NOT_READY
An indicator that the iterate() method did not complete because
the actor was not ready (prefire() returned false).
|
static int |
STOP_ITERATING
An indicator that the actor does not wish to be fired again.
|
Modifier and Type | Method and Description |
---|---|
void |
fire()
Fire the actor.
|
boolean |
isFireFunctional()
Return true if this executable does not change state in either
the prefire() or the fire() method.
|
boolean |
isStrict()
Return true if this executable is strict, meaning all inputs must
be known before iteration.
|
int |
iterate(int count)
Invoke a specified number of iterations of the actor.
|
boolean |
postfire()
This method should be invoked once per iteration, after the last
invocation of fire() in that iteration.
|
boolean |
prefire()
This method should be invoked prior to each invocation of fire().
|
void |
stop()
Request that execution of this Executable stop as soon
as possible.
|
void |
stopFire()
Request that execution of the current iteration complete.
|
void |
terminate()
Terminate any currently executing model with extreme prejudice.
|
addInitializable, initialize, preinitialize, removeInitializable, wrapup
static final int COMPLETED
static final int NOT_READY
static final int STOP_ITERATING
void fire() throws IllegalActionException
IllegalActionException
- If firing is not permitted.boolean isFireFunctional()
boolean isStrict() throws IllegalActionException
IllegalActionException
- Thrown by subclass.int iterate(int count) throws IllegalActionException
An implementation of this method is not required to actually invoke prefire(), fire(), and postfire(). An implementation of this method must, however, perform the equivalent operations.
Note that this method for iterating an actor should be used only in domains where a single invocation of prefire() and fire() is sufficient in an iteration.
count
- The number of iterations to perform.IllegalActionException
- If iterating is not
permitted, or if prefire(), fire(), or postfire() throw it.boolean postfire() throws IllegalActionException
IllegalActionException
- If postfiring is not permitted.boolean prefire() throws IllegalActionException
IllegalActionException
- If prefiring is not permitted.void stop()
void stopFire()
void terminate()
After this method completes, all resources in use should be released and any sub-threads should be killed. However, a consistent state is not guaranteed. The topology should probably be recreated before attempting any further operations. This method should not be synchronized because it must happen as soon as possible, no matter what.