|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.FiringEvent
public class FiringEvent
An event that is published by directors whenever an actor is activated. An activation occurs whenever an actor is prefired, fired, or postfired. The appropriate event should be published just before or after the associated method of the executable interface is called. The iterate event is published by those directors which vectorize firings of a particular actor. This event may be published instead of many individual prefire, fire and postfire events. As an example of how to implement a director that publishes these events, see the SDF Director. One way in which these events are used is to trace the firings of different actors. A user interface can also implement a breakpoint mechanism by pausing execution of the executing thread in response to one of these events.
Note that since most directors work with a constant set of actors, and fire them repeatedly, it may improve efficiency dramatically to use a flyweight design pattern with firing events. This can result in greatly reducing the load on the garbage collector.
DebugListener
Yellow (neuendor) |
Green (neuendor) |
Nested Class Summary | |
---|---|
static class |
FiringEvent.FiringEventType
A type of firing event that can be published. |
Field Summary | |
---|---|
private Actor |
_actor
|
private Director |
_director
|
private int |
_multiplicity
|
private FiringEvent.FiringEventType |
_type
|
static FiringEvent.FiringEventType |
AFTER_FIRE
This type of event is published after a fire method is called. |
static FiringEvent.FiringEventType |
AFTER_ITERATE
This type of event is published after an iterate method is called. |
static FiringEvent.FiringEventType |
AFTER_POSTFIRE
This type of event is published after a postfire method is called. |
static FiringEvent.FiringEventType |
AFTER_PREFIRE
This type of event is published after a prefire method is called. |
static FiringEvent.FiringEventType |
AFTER_RW_FIRE
The type of event published as part of the Kepler sql actor. |
static FiringEvent.FiringEventType |
BEFORE_FIRE
This type of event is published before a fire method is called. |
static FiringEvent.FiringEventType |
BEFORE_ITERATE
This type of event is published before an iterate method is called. |
static FiringEvent.FiringEventType |
BEFORE_POSTFIRE
This type of event is published before a postfire method is called. |
static FiringEvent.FiringEventType |
BEFORE_PREFIRE
This type of event is published before a prefire method is called. |
static FiringEvent.FiringEventType |
BEFORE_RW_FIRE
The type of event published as part of the Kepler sql actor. |
Constructor Summary | |
---|---|
FiringEvent(Director source,
Actor actor,
FiringEvent.FiringEventType type)
Create a new firing event with the given source, actor, and type. |
|
FiringEvent(Director source,
Actor actor,
FiringEvent.FiringEventType type,
int multiplicity)
Create a new firing event with the given source, actor, type, and multiplicity. |
Method Summary | |
---|---|
Actor |
getActor()
Return the actor that is being activated. |
Director |
getDirector()
Return the director that activated the actor. |
NamedObj |
getSource()
Return the source of the event. |
FiringEvent.FiringEventType |
getType()
Return the type of activation that this event represents. |
java.lang.String |
toString()
Return a string representation of this event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final FiringEvent.FiringEventType AFTER_PREFIRE
public static final FiringEvent.FiringEventType AFTER_FIRE
public static final FiringEvent.FiringEventType AFTER_POSTFIRE
public static final FiringEvent.FiringEventType AFTER_ITERATE
public static final FiringEvent.FiringEventType BEFORE_PREFIRE
public static final FiringEvent.FiringEventType BEFORE_FIRE
public static final FiringEvent.FiringEventType BEFORE_POSTFIRE
public static final FiringEvent.FiringEventType BEFORE_ITERATE
public static final FiringEvent.FiringEventType BEFORE_RW_FIRE
public static final FiringEvent.FiringEventType AFTER_RW_FIRE
private Actor _actor
private Director _director
private int _multiplicity
private FiringEvent.FiringEventType _type
Constructor Detail |
---|
public FiringEvent(Director source, Actor actor, FiringEvent.FiringEventType type)
source
- The director invoking the firing.actor
- The actor being fired.type
- An identifier for the method being invoked, which is
one of AFTER_PREFIRE, AFTER_FIRE, AFTER_POSTFIRE, AFTER_ITERATE,
BEFORE_PREFIRE, BEFORE_FIRE, BEFORE_POSTFIRE, or BEFORE_ITERATE.public FiringEvent(Director source, Actor actor, FiringEvent.FiringEventType type, int multiplicity)
source
- The director invoking the firing.actor
- The actor being fired.type
- An identifier for the method being invoked, which is
one of AFTER_PREFIRE, AFTER_FIRE, AFTER_POSTFIRE, AFTER_ITERATE,
BEFORE_PREFIRE, BEFORE_FIRE, BEFORE_POSTFIRE, or BEFORE_ITERATE.multiplicity
- The multiplicity of the firing.Method Detail |
---|
public Actor getActor()
public Director getDirector()
public NamedObj getSource()
getSource
in interface DebugEvent
public FiringEvent.FiringEventType getType()
public java.lang.String toString()
toString
in interface DebugEvent
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |