javax.slee.management
Class TraceNotification

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

public class TraceNotification
extends javax.management.Notification

This notification is emitted by a TraceMBean object when an installed component generates a trace message at a level high enough not to be filtered by the TraceMBean.

The notification type of all trace notifications is specified by the TraceMBean.TRACE_NOTIFICATION_TYPE attribute.

See Also:
Serialized Form

Fields inherited from class javax.management.Notification
source
 
Constructor Summary
TraceNotification(TraceMBean notificationSource, java.lang.String messageType, java.lang.Object messageSource, Level traceLevel, java.lang.String message, java.lang.Throwable cause, long sequenceNumber, long timeStamp)
          Create a TraceNotification to notify listeners of a trace message.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this notification for equality with another object.
 java.lang.Throwable getCause()
          Get the cause (if any) for this trace notification.
 Level getLevel()
          Get the trace level of the trace message.
 java.lang.Object getMessageSource()
          Get the object that identifies the source of the trace message.
 java.lang.String getMessageType()
          Get the type of the trace message.
 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

TraceNotification

public TraceNotification(TraceMBean notificationSource,
                         java.lang.String messageType,
                         java.lang.Object messageSource,
                         Level traceLevel,
                         java.lang.String message,
                         java.lang.Throwable cause,
                         long sequenceNumber,
                         long timeStamp)
                  throws java.lang.NullPointerException,
                         java.lang.IllegalArgumentException
Create a TraceNotification to notify listeners of a trace message.
Parameters:
notificationSource - the TraceMBean object that is emitting this notification.
messageType - the type of the trace message being generated and correspondingly the sub-type of the notification.
messageSource - a component identifier that identifies the component that generated the trace message, for example an SbbID.
traceLevel - the trace level.
message - the trace message.
cause - an optional cause for the trace message.
sequenceNumber - the notification sequence number within the source TraceMBean object.
timeStamp - the time (in ms since January 1, 1970 UTC) that the trace message was generated.
Throws:
java.lang.NullPointerException - if notificationSource, messageType, traceLevel, or message is null.
java.lang.IllegalArgumentException - if traceLevel == Level.OFF.
Method Detail

getMessageType

public final java.lang.String getMessageType()
Get the type of the trace message.
Returns:
the trace message type.

getMessageSource

public final java.lang.Object getMessageSource()
Get the object that identifies the source of the trace message.
Returns:
the trace message source.

getLevel

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

getCause

public final java.lang.Throwable getCause()
Get the cause (if any) for this trace notification.
Returns:
the cause for this trace 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 message type, message source, trace 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.