|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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:
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.
| 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 |
|---|
static final java.lang.String OBJECT_NAME
static final java.lang.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".
| Method Detail |
|---|
java.lang.String[] getAlarms(NotificationSource notificationSource)
throws java.lang.NullPointerException,
UnrecognizedNotificationSourceException,
ManagementException
notificationSource - the component or subsystem in the SLEE of interest.
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.
java.lang.String[] getAlarms()
throws ManagementException
ManagementException - if the alarm identifier could not be obtained due
to a system-level failure.
boolean isActive(java.lang.String alarmID)
throws java.lang.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.
java.lang.NullPointerException - if alarmID is null.
ManagementException - if the existence of the alarm could not be determined
due to a system-level failure.
Alarm getDescriptor(java.lang.String alarmID)
throws java.lang.NullPointerException,
ManagementException
alarmID - the unique alarm identifier.
null if the
specified alarm is not currently active in the SLEE.
java.lang.NullPointerException - if alarmID is null.
ManagementException - if the alarm descriptor could not be obtained
due to a system-level failure.
Alarm[] getDescriptors(java.lang.String[] alarmIDs)
throws java.lang.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.
java.lang.NullPointerException - if alarmIDs is null.
ManagementException - if the alarm descriptors could not be obtained
due to a system-level failure.
boolean clearAlarm(java.lang.String alarmID)
throws java.lang.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.
java.lang.NullPointerException - if alarmID is null.
ManagementException - if the alarm could not be cleared due to a system-level
failure.
int clearAlarms(NotificationSource notificationSource,
java.lang.String alarmType)
throws java.lang.NullPointerException,
UnrecognizedNotificationSourceException,
ManagementException
notificationSource - the component or subsystem in the SLEE which raised
the alarms.alarmType - the type of the alarms to clear.
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.
int clearAlarms(NotificationSource notificationSource)
throws java.lang.NullPointerException,
UnrecognizedNotificationSourceException,
ManagementException
notificationSource - the component or subsystem in the SLEE which raised
the alarms.
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||