javax.management
public class AttributeChangeNotification extends Notification
NotificationBroadcaster
. For example, if a
bean increments the integer, count
, it
should send a notification with the
attributeName
, "count"
,
the attributeType
, "Integer"
and the old and new values of the attribute.Modifier and Type | Field and Description |
---|---|
static String |
ATTRIBUTE_CHANGE
The attribute type for attribute change
notifications.
|
source
Constructor and Description |
---|
AttributeChangeNotification(Object source,
long sequenceNumber,
long timeStamp,
String msg,
String name,
String type,
Object oldVal,
Object newVal)
Constructs a new
AttributeChangeNotification
with the specified source, sequence number, timestamp,
message, and the attribute name, type, old value and
new value. |
Modifier and Type | Method and Description |
---|---|
String |
getAttributeName()
Returns the name of the attribute that changed.
|
String |
getAttributeType()
Returns the type of the attribute that changed.
|
Object |
getNewValue()
Returns the new value of the attribute.
|
Object |
getOldValue()
Returns the old value of the attribute.
|
getMessage, getSequenceNumber, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toString
getSource
public static final String ATTRIBUTE_CHANGE
public AttributeChangeNotification(Object source, long sequenceNumber, long timeStamp, String msg, String name, String type, Object oldVal, Object newVal)
AttributeChangeNotification
with the specified source, sequence number, timestamp,
message, and the attribute name, type, old value and
new value.source
- the producer of the notification, which
is usually the bean that changed the
attribute.sequenceNumber
- the sequence number of the
notification.timeStamp
- the date and time of the notification.msg
- the message content of the notification.name
- the name of the attribute.type
- the type of the attribute.oldVal
- the old value of the attribute.newVal
- the new value of the attribute.public String getAttributeName()
public String getAttributeType()
public Object getOldValue()
public Object getNewValue()