public interface AlarmMBean
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:
NotificationSource object identifying the object in the SLEE
that raised the alarm. Typically this object is provided by the AlarmFacility
used to raise the alarm.
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.
| Modifier and Type | Field and Description |
|---|---|
static 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 String |
OBJECT_NAME
The JMX Object Name string of the SLEE Alarm MBean, equal to the string
"javax.slee.management:name=Alarm".
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearAlarm(String alarmID)
Clear the specified alarm.
|
int |
clearAlarms(NotificationSource notificationSource)
Clear all active alarms raised by the specified notification source.
|
int |
clearAlarms(NotificationSource notificationSource,
String alarmType)
Clear all active alarms of the specified type raised by the specified notification
source.
|
String[] |
getAlarms()
Get the unique alarm identifiers of all stateful alarms currently active
in the SLEE.
|
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(String alarmID)
Get the alarm descriptor for an alarm identifier.
|
Alarm[] |
getDescriptors(String[] alarmIDs)
Get an array of alarm descriptors corresponding to an arary of alarm identifiers.
|
boolean |
isActive(String alarmID)
Determine if a specified alarm is (still) currently active in the SLEE.
|
static final String OBJECT_NAME
static final String ALARM_NOTIFICATION_TYPE
NotificationSource each specify a particular alarm notification type for the
notification source.Alarm notifications
emitted by this MBean. The notification type is equal to the string
"javax.slee.management.alarm".String[] getAlarms(NotificationSource notificationSource) throws NullPointerException, UnrecognizedNotificationSourceException, ManagementException
notificationSource - the component or subsystem in the SLEE of interest.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.String[] getAlarms() throws ManagementException
ManagementException - if the alarm identifier could not be obtained due
to a system-level failure.boolean isActive(String alarmID) throws NullPointerException, ManagementException
alarmID - the unique alarm identifier of the alarm.true if an alarm with the specified alarm identifier is
currently active in the SLEE, false otherwise.NullPointerException - if alarmID is null.ManagementException - if the existence of the alarm could not be determined
due to a system-level failure.Alarm getDescriptor(String alarmID) throws NullPointerException, ManagementException
alarmID - the unique alarm identifier.null if the
specified alarm is not currently active in the SLEE.NullPointerException - if alarmID is null.ManagementException - if the alarm descriptor could not be obtained
due to a system-level failure.Alarm[] getDescriptors(String[] alarmIDs) throws NullPointerException, ManagementException
alarmIDs - an array of alarm identifiers.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.NullPointerException - if alarmIDs is null.ManagementException - if the alarm descriptors could not be obtained
due to a system-level failure.boolean clearAlarm(String alarmID) throws NullPointerException, ManagementException
alarmID - the unique alarm identifier for the alarm.true if the specified alarm existed and was cleared as a
result of this method, false otherwise.NullPointerException - if alarmID is null.ManagementException - if the alarm could not be cleared due to a system-level
failure.int clearAlarms(NotificationSource notificationSource, String alarmType) throws NullPointerException, UnrecognizedNotificationSourceException, ManagementException
notificationSource - the component or subsystem in the SLEE which raised
the alarms.alarmType - the type of the alarms to clear.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.int clearAlarms(NotificationSource notificationSource) throws NullPointerException, UnrecognizedNotificationSourceException, ManagementException
notificationSource - the component or subsystem in the SLEE which raised
the alarms.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.