physis.core.triggers
Interface Trigger

All Known Implementing Classes:
TriggerImpl

public interface Trigger

A trigger is a predefined event which is performed at given time in the system and/or if some conditions occur.
The trigger's parameters are read from a file. One line contains all needed parameters for a triggers. The standard and obligatory parameters are the following:
[trigger_name - without the package pre and Trigger postfix] periodical [start] [end] [step] ...
or
[trigger_name - without the package pre and Trigger postfix] simple [start] ...


Method Summary
 void execute()
          Executes the trigger.
 void initialize(java.util.StringTokenizer parameters)
          Initializes the common parameters.
 void setParameters(java.util.StringTokenizer parameters)
          The specific initialization parameters are in a string separated by whitespaces.
 boolean shouldBeExecuted(long update_count)
          Returns true if the trigger should be executed.
 boolean shouldBeRemoved()
          Returns true if the trigger should be removed from the active triggers-container.
 

Method Detail

shouldBeExecuted

public boolean shouldBeExecuted(long update_count)
Returns true if the trigger should be executed.
Parameters:
update_count - The number of already performed updates. A trigger may ignore this information if its execution doesn't depend on time but some other conditions.

shouldBeRemoved

public boolean shouldBeRemoved()
Returns true if the trigger should be removed from the active triggers-container. This should be checked after execution.

execute

public void execute()
Executes the trigger.

initialize

public void initialize(java.util.StringTokenizer parameters)
Initializes the common parameters. (related to periodicity and scheduling)

setParameters

public void setParameters(java.util.StringTokenizer parameters)
The specific initialization parameters are in a string separated by whitespaces. The parameters can differ in numbers and in types thus this method is defined a very general way.