javax.management
Class Notification

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.management.Notification
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AlarmNotification (src) , AttributeChangeNotification (src) , HostStateChangedNotification (src) , JBossMonitorNotification (src) , MBeanServerNotification (src) , MonitorNotification (src) , NetworkNotification (src) , RelationNotification (src) , TimerAlarmClockNotification (src) , TimerNotification (src)

public class Notification
extends java.util.EventObject

A Notification.

Revisions:

20020329 Adrian Brock:

20020710 Adrian Brock:

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
Notification(java.lang.String type, java.lang.Object source, long sequenceNumber)
          Create a new notification
Notification(java.lang.String type, java.lang.Object source, long sequenceNumber, long timeStamp)
          Create a new notification
Notification(java.lang.String type, java.lang.Object source, long sequenceNumber, long timeStamp, java.lang.String message)
          Create a new notification
Notification(java.lang.String type, java.lang.Object source, long sequenceNumber, java.lang.String message)
          Create a new notification
 
Method Summary
 java.lang.String getMessage()
          Retrieve the message of the notification
 long getSequenceNumber()
          Retrieve the sequence number of the notification
 java.lang.Object getSource()
          Retrieve the source of the notification
 long getTimeStamp()
          Retrieve the time of the notification
 java.lang.String getType()
          Retrieve the type of the notification
 java.lang.Object getUserData()
          Retrieve the user data of the notification
 void setSequenceNumber(long sequenceNumber)
          Set the sequence number of the notifiction
 void setSource(java.lang.Object source)
          Set the source of the notification
 void setTimeStamp(long timeStamp)
          Set the time of the notifiction
 void setUserData(java.lang.Object userData)
          Set the user data of the notifiction
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Notification

public Notification(java.lang.String type,
                    java.lang.Object source,
                    long sequenceNumber)
Create a new notification

Parameters:
type - the type of the notification
source - the source of the notification
sequenceNumber - the sequence number of the notification

Notification

public Notification(java.lang.String type,
                    java.lang.Object source,
                    long sequenceNumber,
                    java.lang.String message)
Create a new notification

Parameters:
type - the type of the notification
source - the source of the notification
sequenceNumber - the sequence number of the notification
message - the message of the notification

Notification

public Notification(java.lang.String type,
                    java.lang.Object source,
                    long sequenceNumber,
                    long timeStamp)
Create a new notification

Parameters:
type - the type of the notification
source - the source of the notification
sequenceNumber - the sequence number of the notification
timeStamp - the time of the notification

Notification

public Notification(java.lang.String type,
                    java.lang.Object source,
                    long sequenceNumber,
                    long timeStamp,
                    java.lang.String message)
Create a new notification

Parameters:
type - the type of the notification
source - the source of the notification
sequenceNumber - the sequence number of the notification
timeStamp - the time of the notification
message - the message of the notification
Method Detail

getSource

public java.lang.Object getSource()
Retrieve the source of the notification

Returns:
the source

setSource

public void setSource(java.lang.Object source)
Set the source of the notification

The source must be either a object name or a string that can be used to create a valid object name.

Parameters:
source - the new source
Throws:
java.lang.IllegalArgumentException - when the object name is invalid

getSequenceNumber

public long getSequenceNumber()
Retrieve the sequence number of the notification

Returns:
the sequence number

setSequenceNumber

public void setSequenceNumber(long sequenceNumber)
Set the sequence number of the notifiction

Parameters:
sequenceNumber - the new sequence number

getType

public java.lang.String getType()
Retrieve the type of the notification

Returns:
the type

getTimeStamp

public long getTimeStamp()
Retrieve the time of the notification

Returns:
the time

setTimeStamp

public void setTimeStamp(long timeStamp)
Set the time of the notifiction

Parameters:
timeStamp - the new time

getMessage

public java.lang.String getMessage()
Retrieve the message of the notification

Returns:
the message

getUserData

public java.lang.Object getUserData()
Retrieve the user data of the notification

Returns:
the user data

setUserData

public void setUserData(java.lang.Object userData)
Set the user data of the notifiction

Parameters:
userData - the new user data

toString

public java.lang.String toString()