javax.slee.management
Class AlarmNotification

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.management.Notification
              |
              +--javax.slee.management.AlarmNotification
All Implemented Interfaces:
java.io.Serializable

public class AlarmNotification
extends javax.management.Notification

This notification is emitted by an AlarmMBean object to indicate some component or subsystem in the SLEE is experiencing a significant problem.

The notification type of all alarm notifications is specified by the AlarmMBean.ALARM_NOTIFICATION_TYPE attribute.

See Also:
Serialized Form

Fields inherited from class javax.management.Notification
source
 
Constructor Summary
AlarmNotification(AlarmMBean notificationSource, java.lang.String alarmType, java.lang.Object alarmSource, Level alarmLevel, java.lang.String message, java.lang.Throwable cause, long sequenceNumber, long timeStamp)
          Create an AlarmNotification to notify listeners of a alarm.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this notification for equality with another object.
 java.lang.Object getAlarmSource()
          Get the object that identifies the source of the alarm.
 java.lang.String getAlarmType()
          Get the type of the alarm.
 java.lang.Throwable getCause()
          Get the cause (if any) for this alarm notification.
 Level getLevel()
          Get the alarm level of the alarm.
 int hashCode()
          Get a hash code value for this notification.
 java.lang.String toString()
          Get a string representation for this notification.
 
Methods inherited from class javax.management.Notification
getMessage, getSequenceNumber, getSource, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlarmNotification

public AlarmNotification(AlarmMBean notificationSource,
                         java.lang.String alarmType,
                         java.lang.Object alarmSource,
                         Level alarmLevel,
                         java.lang.String message,
                         java.lang.Throwable cause,
                         long sequenceNumber,
                         long timeStamp)
                  throws java.lang.NullPointerException,
                         java.lang.IllegalArgumentException
Create an AlarmNotification to notify listeners of a alarm.
Parameters:
notificationSource - the AlarmMBean object that is emitting this notification.
alarmType - the type of the alarm being generated. Typically a management client should be able to infer the type of the alarmSource object by inspecting this type.
alarmSource - an object that identifies the object that generated the alarm, for example an SbbID.
alarmLevel - the alarm level.
message - the alarm message.
cause - an optional cause for the alarm.
sequenceNumber - the notification sequence number within the source AlarmMBean object.
timeStamp - the time (in ms since January 1, 1970 UTC) that the alarm was generated.
Throws:
java.lang.NullPointerException - if notificationSource, alarmType, alarmLevel, or message is null.
java.lang.IllegalArgumentException - if alarmLevel == Level.OFF.
Method Detail

getAlarmType

public final java.lang.String getAlarmType()
Get the type of the alarm.
Returns:
the alarm type.

getAlarmSource

public final java.lang.Object getAlarmSource()
Get the object that identifies the source of the alarm.
Returns:
the alarm source.

getLevel

public final Level getLevel()
Get the alarm level of the alarm.
Returns:
the alarm level.

getCause

public final java.lang.Throwable getCause()
Get the cause (if any) for this alarm notification.
Returns:
the cause for this alarm notification, or null if there wasn't a cause.

equals

public boolean equals(java.lang.Object obj)
Compare this notification for equality with another object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this with.
Returns:
true if obj is an instance of this class and the alarm type, alarm source, alarm level and message attributes of obj are the same as the corresponding attributes of this.

hashCode

public int hashCode()
Get a hash code value for this notification. The hash code is the hash code of the notification's message.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this notification.

toString

public java.lang.String toString()
Get a string representation for this notification.
Overrides:
toString in class java.util.EventObject
Returns:
a string representation for this notification.