org.qi4j.library.alarm
Class AlarmSystem.AlarmSystemMixin

java.lang.Object
  extended by org.qi4j.library.alarm.AlarmSystem.AlarmSystemMixin
All Implemented Interfaces:
AlarmSystem
Enclosing interface:
AlarmSystem

public static class AlarmSystem.AlarmSystemMixin
extends java.lang.Object
implements AlarmSystem

AlarmSystem implementation.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.qi4j.library.alarm.AlarmSystem
AlarmSystem.AlarmSystemMixin
 
Constructor Summary
AlarmSystem.AlarmSystemMixin()
           
 
Method Summary
 void addAlarmListener(AlarmListener listener)
          Register AlarmListener to recieve AlarmEvents from all Alarms managed by this AlarmSystem.
 void alarmFired(AlarmEvent event)
           
 Query<AlarmPoint> alarmList()
          Returns a list of all Alarms registered to the service.
 java.util.List<AlarmListener> alarmListeners()
          Returns an immmutable list of all AlarmListeners registered to the service.
 java.util.List<AlarmModelDescriptor> alarmModels()
          Returns all the AlarmModels that has been installed.
 AlarmPoint createAlarm(java.lang.String name, AlarmCategory category)
          Creates an AlarmPoint with the default AlarmModel.
 AlarmModel defaultAlarmModel()
          Returns the default AlarmModel.
 void removeAlarmListener(AlarmListener listener)
          Remove the AlarmListener from the AlarmSystem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlarmSystem.AlarmSystemMixin

public AlarmSystem.AlarmSystemMixin()
Method Detail

alarmModels

public java.util.List<AlarmModelDescriptor> alarmModels()
Returns all the AlarmModels that has been installed.

Specified by:
alarmModels in interface AlarmSystem
Returns:
all the AlarmModels that has been installed.

defaultAlarmModel

public AlarmModel defaultAlarmModel()
Returns the default AlarmModel.

Specified by:
defaultAlarmModel in interface AlarmSystem
Returns:
the default AlarmModel in this AlarmSystem.

createAlarm

public AlarmPoint createAlarm(java.lang.String name,
                              AlarmCategory category)
Creates an AlarmPoint with the default AlarmModel.

Specified by:
createAlarm in interface AlarmSystem
Parameters:
name - The system name of the AlarmPoint.
category - The AlarmPoint Category the created alarm should belong to.
Returns:
the created AlarmPoint with the given name using the default AlarmModel.

addAlarmListener

public void addAlarmListener(AlarmListener listener)
Register AlarmListener to recieve AlarmEvents from all Alarms managed by this AlarmSystem.

Specified by:
addAlarmListener in interface AlarmSystem
Parameters:
listener - the global listener to be added.

removeAlarmListener

public void removeAlarmListener(AlarmListener listener)
Remove the AlarmListener from the AlarmSystem.

Specified by:
removeAlarmListener in interface AlarmSystem
Parameters:
listener - the global listener to be removed.

alarmList

public Query<AlarmPoint> alarmList()
Returns a list of all Alarms registered to the service.

Specified by:
alarmList in interface AlarmSystem
Returns:
a list of all Alarms registered to the service.

alarmListeners

public java.util.List<AlarmListener> alarmListeners()
Description copied from interface: AlarmSystem
Returns an immmutable list of all AlarmListeners registered to the service.

Specified by:
alarmListeners in interface AlarmSystem
Returns:
a list of all AlarmListeners registered to the service.

alarmFired

public void alarmFired(AlarmEvent event)