|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.kivi.AbstractTrigger
public abstract class AbstractTrigger
Abstract base implementation for triggers.
Constructor Summary | |
---|---|
AbstractTrigger()
|
Method Summary | |
---|---|
boolean |
isActive()
Checks whether the trigger is active or not. |
abstract void |
register()
Called when the trigger is activated, e.g., if KIVi is (re-)activated or the first ICombination being fired by such a trigger is loaded. |
void |
setActive(boolean a)
Called by the view management to register or unregister this trigger. |
void |
synchronizedTrigger(ITriggerState triggerState)
Triggers a TriggerState just as trigger(ITriggerState) , but
blocks this thread until all effects that are created following this trigger
are executed on the effects thread. |
void |
trigger(ITriggerState triggerState)
Inform the view management about an event. |
abstract void |
unregister()
Called when the trigger is deactivated, e.g., if the whole KIVi is deactivated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTrigger()
Method Detail |
---|
public void trigger(ITriggerState triggerState)
trigger
in interface ITrigger
triggerState
- new instance of the corresponding trigger state classpublic void synchronizedTrigger(ITriggerState triggerState) throws InterruptedException
trigger(ITriggerState)
, but
blocks this thread until all effects that are created following this trigger
are executed on the effects thread. Hence this method can be used to
create back pressure and block the triggering of new effects until all
old effects have been executed. Therefore the effects queue will not
explode.
triggerState
- the new state that KIVi should distribute
InterruptedException
- if the blocking is interruptedpublic void setActive(boolean a)
setActive
in interface ITrigger
a
- true if registeringpublic boolean isActive()
isActive
in interface ITrigger
public abstract void register()
ICombination
being fired by such a trigger is loaded.
Registers itself where necessary.
register
in interface ITrigger
public abstract void unregister()
unregister
in interface ITrigger
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |