|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.luc.cs.trull.EmptyComponent
edu.luc.cs.trull.TerminatingComponent
edu.luc.cs.trull.AbstractComponent
edu.luc.cs.trull.EmitComponent
edu.luc.cs.trull.Emit
public class Emit
A basic component for unconditional event emission. When started, the component schedules an event for emission; as soon as the event has been scheduled, the component terminates immediately.
| Field Summary | |
|---|---|
private EventFunction |
generator
The function on events used to generate the data value of the event to be emitted. |
private java.lang.String |
label
The label (property name) of the event to be emitted. |
private static org.apache.log4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
Emit()
Constructs an Emit component. |
|
Emit(java.lang.String label)
Constructs an Emit component that fires an event with the given String label (property name) and no data. |
|
Emit(java.lang.String label,
EventFunction generator)
Constructs an Emit component that fires an event with the given String label and whose data value (new property value) is computed dynamically using the given generator. |
|
Emit(java.lang.String label,
java.lang.Object value)
Constructs an Emit component that fires an event with the given String label and the given constant data. |
|
| Method Summary | |
|---|---|
java.lang.String |
getLabel()
Returns the label (property name) of the event to be emitted. |
EventFunction |
getValueGenerator()
Returns the generator for the data value (new property value) of the event to be emitted. |
void |
setLabel(java.lang.String label)
Sets the label (property name) of the event to be emitted. |
void |
setValueGenerator(EventFunction generator)
Sets the generator for the data value (new property value) of the event to be emitted. |
void |
start(java.beans.PropertyChangeEvent incoming)
Starts this startable component. |
| Methods inherited from class edu.luc.cs.trull.EmitComponent |
|---|
eventEmitter, eventEmitterCached, eventEmitterUncached, resume, scheduleEvent, scheduleEvent, scheduleEvent, stop, suspend |
| Methods inherited from class edu.luc.cs.trull.AbstractComponent |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getExternalListeners, getPropertyChangeListeners, removePropertyChangeListener |
| Methods inherited from class edu.luc.cs.trull.TerminatingComponent |
|---|
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener |
| Methods inherited from class edu.luc.cs.trull.EmptyComponent |
|---|
getTerminationListener, propertyChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private EventFunction generator
private java.lang.String label
private static final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public Emit()
public Emit(java.lang.String label)
label - the label of the event to be fired.
public Emit(java.lang.String label,
EventFunction generator)
label - the label of the event to be emitted.generator - the generator for the data value of the event to be emitted.
public Emit(java.lang.String label,
java.lang.Object value)
label - the label of the event to be emitted.value - the data value (new property value) of the event to be emitted.| Method Detail |
|---|
public java.lang.String getLabel()
public EventFunction getValueGenerator()
public void setLabel(java.lang.String label)
public void setValueGenerator(EventFunction generator)
public void start(java.beans.PropertyChangeEvent incoming)
Startable
start in interface Startablestart in class EmitComponentincoming - the event that triggered the invocation of this method. May be null.
|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||