|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.slee.management.Alarm
public final class Alarm
The Alarm class contains information about an alarm that has
been raised in the SLEE.
Serialization of this class takes into account cause Throwable objects that may not
be deserializable client-side due to classloader issues. For example, if the cause
of an alarm is an object of a custom exception class included in the deployable unit
of a component, a generic client may not have that class available in its classpath
or be able to load it via Java's remote class loading mechanisms (eg. the codebase
URL could be a file:// URL on a different host that cannot be resolved on the client
host). Serialization of an Alarm object containing a cause includes the
stack trace of that cause in the serialization stream. If the cause Throwable
cannot be later deserialized with the Alarm object, a generic
java.lang.Exception with a message containing the original stack trace
is returned as the alarm's cause instead.
| Constructor Summary | |
|---|---|
Alarm(java.lang.String alarmID,
NotificationSource notificationSource,
java.lang.String alarmType,
java.lang.String instanceID,
AlarmLevel level,
java.lang.String message,
java.lang.Throwable cause,
long timestamp)
Create an Alarm object that contains information about an
alarm that has been raised in the SLEE. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
Compare this alarm with the specified object for order. |
static void |
disableVendorDataDeserialization()
Disable the deserialization of vendor-specific data for objects of this class. |
static void |
disableVendorDataSerialization()
Disable the serialization of vendor-specific data for objects of this class. |
static void |
enableVendorDataDeserialization()
Enable the deserialization of vendor-specific data for objects of this class. |
static void |
enableVendorDataSerialization()
Enable the serialization of vendor-specific data for objects of this class. |
boolean |
equals(java.lang.Object obj)
Compare this alarm for equality with another object. |
java.lang.String |
getAlarmID()
Get the unique alarm identifier for the alarm. |
AlarmLevel |
getAlarmLevel()
Get the alarm level of the alarm. |
java.lang.String |
getAlarmType()
Get the identifier specifying the type of the alarm, provided when the alarm was raised. |
java.lang.Throwable |
getCause()
Get the cause provided when the alarm was raised (if any). |
java.lang.String |
getInstanceID()
Get the identifier specifying the particular instance of the alarm type, provided when the alarm was raised. |
java.lang.String |
getMessage()
Get the message provided when the alarm was raised. |
NotificationSource |
getNotificationSource()
Get the object that identifies the component or subsystem in the SLEE that raised the alarm. |
long |
getTimestamp()
Get the time (in ms since January 1, 1970 UTC) that the alarm was raised. |
java.lang.Object |
getVendorData()
Get the vendor-specific data. |
int |
hashCode()
Get a hash code value for this alarm. |
void |
setVendorData(java.lang.Object vendorData)
Set the vendor-specific data. |
java.lang.String |
toString()
Get a string representation for this alarm. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Alarm(java.lang.String alarmID,
NotificationSource notificationSource,
java.lang.String alarmType,
java.lang.String instanceID,
AlarmLevel level,
java.lang.String message,
java.lang.Throwable cause,
long timestamp)
throws java.lang.NullPointerException
Alarm object that contains information about an
alarm that has been raised in the SLEE.
alarmID - the unique alarm identifier for the alarm.notificationSource - the component or subsystem in the SLEE that raised
the alarm.alarmType - an identifier specifying the type of the alarm.instanceID - an identifier specifying the particular instance of the
alarm type.level - the alarm level of the alarm.message - the reason for the alarm.cause - an optional cause throwable for the alarm. May be null
if no cause was provided when the alarm was raised.timestamp - the time (in ms since January 1, 1970 UTC) that the alarm
was raised.
java.lang.NullPointerException - if alarmID, notificationSource,
alarmType, instanceID, level,
or message is null.| Method Detail |
|---|
public java.lang.String getAlarmID()
public NotificationSource getNotificationSource()
public java.lang.String getAlarmType()
public java.lang.String getInstanceID()
public AlarmLevel getAlarmLevel()
public java.lang.String getMessage()
public java.lang.Throwable getCause()
null if no cause was provided.public long getTimestamp()
public static void enableVendorDataSerialization()
By default, any vendor-specific data included in an object of this class will not be included in the serialization stream when the object is serialized. Invoking this method changes this behavior so that vendor-specific data is included in the serialization stream when an object of this class is serialized.
This method should only be invoked if the vendor-specific data is serializable via standard Java serialization means.
disableVendorDataSerialization(),
setVendorData(java.lang.Object)public static void disableVendorDataSerialization()
If the serialization of vendor-specific data for objects of this class has
been enabled via the enableVendorDataSerialization() method, this
method disables that behavior again.
public static void enableVendorDataDeserialization()
By default, any vendor-specific data included in the serialization stream of objects of this class is discarded upon deserialization. Invoking this method changes that behavior so that the vendor-specific data is also deserialized when an object of this class is deserialized. A management client that enables the deserialization of vendor-specific data must ensure that any necessary classes required to deserialize that data is available in the relevant classloader.
disableVendorDataDeserialization(),
getVendorData()public static void disableVendorDataDeserialization()
If the deserialization of vendor-specific data for objects of this class has
been enabled via the enableVendorDataDeserialization() method, this
method disables that behavior again.
public void setVendorData(java.lang.Object vendorData)
setVendorData in interface VendorExtensionsvendorData - the vendor-specific data.public java.lang.Object getVendorData()
getVendorData in interface VendorExtensionspublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare this with.
true if obj is an alarm with the same
notification source, alarm type, and alarm instance ID as this,
false otherwise.Object.equals(Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public int compareTo(java.lang.Object obj)
Alarm ordering is determined by comparing unique the alarm identifier.
compareTo in interface java.lang.Comparableobj - the object to compare this with.
java.lang.ClassCastException - if obj is not an instance of this
class.Comparable.compareTo(Object)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||