javax.slee.management
Interface AlarmMBean


public interface AlarmMBean

The AlarmMBean interface defines the management interface for the SLEE alarm subsystem. Alarm sources such as SBBs and Resource Adaptor Entities use the AlarmFacility to raise and clear alarms. Using the AlarmMBean, a management client may obtain information about the alarms currently active in the SLEE, and may selectively clear alarms as required. Whenever an alarm is raised or cleared an AlarmNotification of the relevant type is generated.

The JMX Object Name of the AlarmMBean object is specified by the OBJECT_NAME constant. The Object Name can also be obtained by a management client via the SleeManagementMBean.getAlarmMBean() method.

Alarm Identification
Alarms in the SLEE are uniquely identified by three attributes:

Notifications
Since an AlarmMBean object can emit alarm notifications, it is required that the AlarmMBean object implement the javax.management.NotificationBroadcaster interface.

Note: In SLEE 1.0 an Alarm MBean emitted only one type of notification, defined by ALARM_NOTIFICATION_TYPE. As of SLEE 1.1, an AlarmMBean object may emit alarm notifications of different types, depending on the notification source of the object that raised the alarm. The SLEE-defined classes that implement NotificationSource each specify the type of alarm notification that is generated for the notification source.


Field Summary
static java.lang.String ALARM_NOTIFICATION_TYPE
          Deprecated. Different notification types may be generated by the Alarm MBean depending on where the alarm state was modified. The SLEE-defined classes that implement NotificationSource each specify a particular alarm notification type for the notification source.
static java.lang.String OBJECT_NAME
          The JMX Object Name string of the SLEE Alarm MBean, equal to the string "javax.slee.management:name=Alarm".
 
Method Summary
 boolean clearAlarm(java.lang.String alarmID)
          Clear the specified alarm.
 int clearAlarms(NotificationSource notificationSource)
          Clear all active alarms raised by the specified notification source.
 int clearAlarms(NotificationSource notificationSource, java.lang.String alarmType)
          Clear all active alarms of the specified type raised by the specified notification source.
 java.lang.String[] getAlarms()
          Get the unique alarm identifiers of all stateful alarms currently active in the SLEE.
 java.lang.String[] getAlarms(NotificationSource notificationSource)
          Get the unique alarm identifiers for stateful alarms currently active in the SLEE that were raised by the specified notification source.
 Alarm getDescriptor(java.lang.String alarmID)
          Get the alarm descriptor for an alarm identifier.
 Alarm[] getDescriptors(java.lang.String[] alarmIDs)
          Get an array of alarm descriptors corresponding to an arary of alarm identifiers.
 boolean isActive(java.lang.String alarmID)
          Determine if a specified alarm is (still) currently active in the SLEE.
 

Field Detail

OBJECT_NAME

static final java.lang.String OBJECT_NAME
The JMX Object Name string of the SLEE Alarm MBean, equal to the string "javax.slee.management:name=Alarm".

Since:
SLEE 1.1
See Also:
Constant Field Values

ALARM_NOTIFICATION_TYPE

static final java.lang.String ALARM_NOTIFICATION_TYPE
Deprecated. Different notification types may be generated by the Alarm MBean depending on where the alarm state was modified. The SLEE-defined classes that implement NotificationSource each specify a particular alarm notification type for the notification source.
The notification type of Alarm notifications emitted by this MBean. The notification type is equal to the string "javax.slee.management.alarm".

See Also:
Constant Field Values
Method Detail

getAlarms

java.lang.String[] getAlarms(NotificationSource notificationSource)
                             throws java.lang.NullPointerException,
                                    UnrecognizedNotificationSourceException,
                                    ManagementException
Get the unique alarm identifiers for stateful alarms currently active in the SLEE that were raised by the specified notification source.

Parameters:
notificationSource - the component or subsystem in the SLEE of interest.
Returns:
an array containing the alarm identifiers of all the alarms currently active in the SLEE that were raised by the specified notification source.
Throws:
java.lang.NullPointerException - if notificationSource is null.
UnrecognizedNotificationSourceException - if notificationSource does not identify a notification source recognizable by the SLEE.
ManagementException - if the alarm identifiers could not be obtained due to a system-level failure.
Since:
SLEE 1.1

getAlarms

java.lang.String[] getAlarms()
                             throws ManagementException
Get the unique alarm identifiers of all stateful alarms currently active in the SLEE.

Returns:
an array containing the alarm identifiers of all the alarms currently active in the SLEE.
Throws:
ManagementException - if the alarm identifier could not be obtained due to a system-level failure.
Since:
SLEE 1.1

isActive

boolean isActive(java.lang.String alarmID)
                 throws java.lang.NullPointerException,
                        ManagementException
Determine if a specified alarm is (still) currently active in the SLEE.

Parameters:
alarmID - the unique alarm identifier of the alarm.
Returns:
true if an alarm with the specified alarm identifier is currently active in the SLEE, false otherwise.
Throws:
java.lang.NullPointerException - if alarmID is null.
ManagementException - if the existence of the alarm could not be determined due to a system-level failure.
Since:
SLEE 1.1

getDescriptor

Alarm getDescriptor(java.lang.String alarmID)
                    throws java.lang.NullPointerException,
                           ManagementException
Get the alarm descriptor for an alarm identifier.

Parameters:
alarmID - the unique alarm identifier.
Returns:
the alarm descriptor for the alarm, or null if the specified alarm is not currently active in the SLEE.
Throws:
java.lang.NullPointerException - if alarmID is null.
ManagementException - if the alarm descriptor could not be obtained due to a system-level failure.
Since:
SLEE 1.1

getDescriptors

Alarm[] getDescriptors(java.lang.String[] alarmIDs)
                       throws java.lang.NullPointerException,
                              ManagementException
Get an array of alarm descriptors corresponding to an arary of alarm identifiers.

Parameters:
alarmIDs - an array of alarm identifiers.
Returns:
an array of alarm descriptor objects. This array will be the same length as the supplied array, and if descriptors = getDescriptors(alarmIDs) then descriptors[i] == getDescriptor(alarmIDs[i]). Any alarm identifier present in ids that does not identify a activty alarm in the SLEE results in a null value at the corresponding array index in this array.
Throws:
java.lang.NullPointerException - if alarmIDs is null.
ManagementException - if the alarm descriptors could not be obtained due to a system-level failure.
Since:
SLEE 1.1

clearAlarm

boolean clearAlarm(java.lang.String alarmID)
                   throws java.lang.NullPointerException,
                          ManagementException
Clear the specified alarm. If the alarm has already been cleared, or no such alarm exists in the SLEE, this method returns with no effect.

Parameters:
alarmID - the unique alarm identifier for the alarm.
Returns:
true if the specified alarm existed and was cleared as a result of this method, false otherwise.
Throws:
java.lang.NullPointerException - if alarmID is null.
ManagementException - if the alarm could not be cleared due to a system-level failure.
Since:
SLEE 1.1

clearAlarms

int clearAlarms(NotificationSource notificationSource,
                java.lang.String alarmType)
                throws java.lang.NullPointerException,
                       UnrecognizedNotificationSourceException,
                       ManagementException
Clear all active alarms of the specified type raised by the specified notification source. If no active alarms of the specified type are found, this method has no effect.

Parameters:
notificationSource - the component or subsystem in the SLEE which raised the alarms.
alarmType - the type of the alarms to clear.
Returns:
the number of alarms cleared by this method call. May be zero if no alarms were cleared.
Throws:
java.lang.NullPointerException - if either argument is null.
UnrecognizedNotificationSourceException - if notificationSource does not identify a notification source recognizable by the SLEE.
ManagementException - if the alarms could not be cleared due to a system-level failure.
Since:
SLEE 1.1

clearAlarms

int clearAlarms(NotificationSource notificationSource)
                throws java.lang.NullPointerException,
                       UnrecognizedNotificationSourceException,
                       ManagementException
Clear all active alarms raised by the specified notification source. If no active alarms exist for the notification source, this method has no effect.

Parameters:
notificationSource - the component or subsystem in the SLEE which raised the alarms.
Returns:
the number of alarms cleared by this method call. May be zero if no alarms were cleared.
Throws:
java.lang.NullPointerException - if notificationSource is null.
UnrecognizedNotificationSourceException - if notificationSource does not identify a notification source recognizable by the SLEE.
ManagementException - if the alarms could not be cleared due to a system-level failure.
Since:
SLEE 1.1


Copyright © 2008. All Rights Reserved.