public class FiringEvent extends java.lang.Object implements DebugEvent
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
Modifier and Type | Class and Description |
---|---|
static class |
FiringEvent.FiringEventType
A type of firing event that can be published.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
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.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