|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AlarmModel
Definition of the behaviour of the alarm model.
The AlarmModel is basically the state machine of the Alarm system,
and it is possible to define different AlarmModel
s
for each and every alarm. Alarms that are assigned the default
AlarmModel
of the AlarmSystem
can be
re-assigned another AlarmModel
in runtime, just by
changing the default AlarmModel
in the
AlarmSystem
. Alarms can also change the
AlarmModel
by calling the setAlarmModel
in each alarm individually.
AlarmSystem
Method Summary | |
---|---|
List<String> |
alarmTriggers()
Returns an array of alarm triggers valid for this AlarmModel. |
boolean |
computeCondition(AlarmStatus status)
|
String |
computeTrigger(AlarmStatus status,
boolean condition)
|
AlarmEvent |
evaluate(Alarm alarm,
String trigger)
Execute the required changes upon an AlarmTrigger. |
String |
modelDescription()
Returns a Description of the AlarmModel in the default Locale. |
String |
modelDescription(Locale locale)
Returns a Description of the AlarmModel. |
String |
modelName()
Returns the Name of the AlarmModel. |
List<String> |
statusList()
|
Method Detail |
---|
AlarmEvent evaluate(Alarm alarm, String trigger) throws IllegalArgumentException
alarm
- The Alarm the trigger is for.trigger
- the AlarmTrigger that was used.
IllegalArgumentException
- If the trigger given is not supported by this alarm model.List<String> statusList()
List<String> alarmTriggers()
String computeTrigger(AlarmStatus status, boolean condition)
boolean computeCondition(AlarmStatus status)
String modelName()
String modelDescription()
String modelDescription(@Optional Locale locale)
null
, then the
default Locale is used.
locale
- The locale that should be used for the description, or null for the default locale.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |