de.cau.cs.kieler.core.kivi.test
Class TestTriggerSpammerSynchronized

java.lang.Object
  extended by de.cau.cs.kieler.core.kivi.AbstractTrigger
      extended by de.cau.cs.kieler.core.kivi.test.TestTriggerSpammerSynchronized
All Implemented Interfaces:
ITrigger, Runnable

public class TestTriggerSpammerSynchronized
extends AbstractTrigger
implements Runnable

A simple Trigger for unit tests that runs in an own thread and triggers every 1ms, i.e. it spams the system with quick events. Is synchronized on the effects queue.

Rating red

Nested Class Summary
static class TestTriggerSpammerSynchronized.SynchronizedSpamState
           
 
Constructor Summary
TestTriggerSpammerSynchronized()
           
 
Method Summary
 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 run()
          When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
 void unregister()
          Called when the trigger is deactivated, e.g., if the whole KIVi is deactivated.
 
Methods inherited from class de.cau.cs.kieler.core.kivi.AbstractTrigger
isActive, setActive, synchronizedTrigger, trigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTriggerSpammerSynchronized

public TestTriggerSpammerSynchronized()
Method Detail

register

public 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. Registers itself where necessary.

Specified by:
register in interface ITrigger
Specified by:
register in class AbstractTrigger

unregister

public void unregister()
Called when the trigger is deactivated, e.g., if the whole KIVi is deactivated. Unregisters itself where necessary.

Specified by:
unregister in interface ITrigger
Specified by:
unregister in class AbstractTrigger

run

public void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

Specified by:
run in interface Runnable