Top Description Fields Constructors Methods
javax.management.modelmbean

public Class ModelMBeanNotificationInfo

extends MBeanNotificationInfo
implements DescriptorAccess
Class Inheritance
All Implemented Interfaces
javax.management.DescriptorAccess, javax.management.DescriptorRead
Annotations
@SuppressWarnings:serial
Static Imports
com.sun.jmx.defaults.JmxProperties.MODELMBEAN_LOGGER

The ModelMBeanNotificationInfo object describes a notification emitted by a ModelMBean. It is a subclass of MBeanNotificationInfo with the addition of an associated Descriptor and an implementation of the Descriptor interface.

The fields in the descriptor are defined, but not limited to, the following. Note that when the Type in this table is Number, a String that is the decimal representation of a Long can also be used.

ModelMBeanNotificationInfo Fields
NameTypeMeaning
nameString Notification name.
descriptorTypeString Must be "notification".
severityNumber 0-6 where 0: unknown; 1: non-recoverable; 2: critical, failure; 3: major, severe; 4: minor, marginal, error; 5: warning; 6: normal, cleared, informative
messageIDString Unique key for message text (to allow translation, analysis).
messageTextString Text of notification.
logString T - log message, F - do not log message.
logfileString fully qualified file name appropriate for operating system.
visibilityNumber 1-4 where 1: always visible 4: rarely visible.
presentationStringString XML formatted string to allow presentation of data.

The default descriptor contains the name, descriptorType, displayName and severity(=6) fields. The default value of the name and displayName fields is the name of the Notification class (as specified by the name parameter of the ModelMBeanNotificationInfo constructor).

The serialVersionUID of this class is -7445681389570207141L.

Since
1.5

Field Summary

Modifier and TypeField and Description
private static boolean
private static final String
private static final ObjectStreamField[]
private static final long
private Descriptor
private static final ObjectStreamField[]
private static final long
private static final ObjectStreamField[]
private static final long

Constructor Summary

AccessConstructor and Description
public
ModelMBeanNotificationInfo(String[]
The array of strings (in dot notation) containing the notification types that may be emitted.
notifTypes
,
String
The name of the Notification class.
name
,
String
A human readable description of the Notification. Optional.
description
)

Constructs a ModelMBeanNotificationInfo object with a default descriptor.

public
ModelMBeanNotificationInfo(String[]
The array of strings (in dot notation) containing the notification types that may be emitted.
notifTypes
,
String
The name of the Notification class.
name
,
String
A human readable description of the Notification. Optional.
description
,
Descriptor
An instance of Descriptor containing the appropriate metadata for this instance of the MBeanNotificationInfo. If it is null a default descriptor will be created. If the descriptor does not contain the fields "displayName" or "severity", the missing ones are added with their default values.
descriptor
)

Constructs a ModelMBeanNotificationInfo object.

public
ModelMBeanNotificationInfo(ModelMBeanNotificationInfo
the ModelMBeanNotificationInfo to be duplicated
inInfo
)

Constructs a new ModelMBeanNotificationInfo object from this ModelMBeanNotfication Object.

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides javax.management.MBeanNotificationInfo.clone.

Creates and returns a new ModelMBeanNotificationInfo which is a duplicate of this ModelMBeanNotificationInfo.

public Descriptor

Returns:

Descriptor associated with the ModelMBeanNotificationInfo object.
getDescriptor
()

Overrides javax.management.MBeanFeatureInfo.getDescriptor.

Implements javax.management.DescriptorRead.getDescriptor.

Returns a copy of the associated Descriptor for the ModelMBeanNotificationInfo.

private void
public void
setDescriptor(Descriptor
replaces the Descriptor associated with the ModelMBeanNotification interface
inDescriptor
)

Implements javax.management.DescriptorAccess.setDescriptor.

Sets associated Descriptor (full replace) for the ModelMBeanNotificationInfo If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor.

public String

Returns:

a string describing this object.
toString
()

Overrides javax.management.MBeanNotificationInfo.toString.

Returns a human readable string containing ModelMBeanNotificationInfo.

private Descriptor
validDescriptor(final Descriptor
Descriptor to be checked, or null which is equivalent to an empty Descriptor.
in
)

Clones the passed in Descriptor, sets default values, and checks for validity.

private void
Inherited from javax.management.MBeanNotificationInfo:
equalsgetNotifTypeshashCode

Field Detail

compatback to summary
private static boolean compat
currClassback to summary
private static final String currClass
newSerialPersistentFieldsback to summary
private static final ObjectStreamField[] newSerialPersistentFields
newSerialVersionUIDback to summary
private static final long newSerialVersionUID
notificationDescriptorback to summary
private Descriptor notificationDescriptor
oldSerialPersistentFieldsback to summary
private static final ObjectStreamField[] oldSerialPersistentFields
oldSerialVersionUIDback to summary
private static final long oldSerialVersionUID
serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
Serial Fields:
notificationDescriptor:Descriptor
The descriptor containing the appropriate metadata for this instance
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.management.MBeanNotificationInfo.serialVersionUID.

Constructor Detail

ModelMBeanNotificationInfoback to summary
public ModelMBeanNotificationInfo(String[] notifTypes, String name, String description)

Constructs a ModelMBeanNotificationInfo object with a default descriptor.

Parameters
notifTypes:String[]

The array of strings (in dot notation) containing the notification types that may be emitted.

name:String

The name of the Notification class.

description:String

A human readable description of the Notification. Optional.

ModelMBeanNotificationInfoback to summary
public ModelMBeanNotificationInfo(String[] notifTypes, String name, String description, Descriptor descriptor)

Constructs a ModelMBeanNotificationInfo object.

Parameters
notifTypes:String[]

The array of strings (in dot notation) containing the notification types that may be emitted.

name:String

The name of the Notification class.

description:String

A human readable description of the Notification. Optional.

descriptor:Descriptor

An instance of Descriptor containing the appropriate metadata for this instance of the MBeanNotificationInfo. If it is null a default descriptor will be created. If the descriptor does not contain the fields "displayName" or "severity", the missing ones are added with their default values.

Exceptions
RuntimeOperationsException:
Wraps an IllegalArgumentException. The descriptor is invalid, or descriptor field "name" is not equal to parameter name, or descriptor field "descriptorType" is not equal to "notification".
ModelMBeanNotificationInfoback to summary
public ModelMBeanNotificationInfo(ModelMBeanNotificationInfo inInfo)

Constructs a new ModelMBeanNotificationInfo object from this ModelMBeanNotfication Object.

Parameters
inInfo:ModelMBeanNotificationInfo

the ModelMBeanNotificationInfo to be duplicated

Method Detail

cloneback to summary
public Object clone()

Overrides javax.management.MBeanNotificationInfo.clone.

Creates and returns a new ModelMBeanNotificationInfo which is a duplicate of this ModelMBeanNotificationInfo.

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

getDescriptorback to summary
public Descriptor getDescriptor()

Overrides javax.management.MBeanFeatureInfo.getDescriptor.

Implements javax.management.DescriptorRead.getDescriptor.

Returns a copy of the associated Descriptor for the ModelMBeanNotificationInfo.

Returns:Descriptor

Descriptor associated with the ModelMBeanNotificationInfo object.

See Also
setDescriptor
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Hides javax.management.MBeanNotificationInfo.readObject.

Deserializes a ModelMBeanNotificationInfo from an ObjectInputStream.

setDescriptorback to summary
public void setDescriptor(Descriptor inDescriptor)

Implements javax.management.DescriptorAccess.setDescriptor.

Sets associated Descriptor (full replace) for the ModelMBeanNotificationInfo If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor. The Descriptor is validated before it is assigned. If the new Descriptor is invalid, then a RuntimeOperationsException wrapping an IllegalArgumentException is thrown.

Parameters
inDescriptor:Descriptor

replaces the Descriptor associated with the ModelMBeanNotification interface

Exceptions
RuntimeOperationsException:
Wraps an IllegalArgumentException for invalid Descriptor.
See Also
getDescriptor
toStringback to summary
public String toString()

Overrides javax.management.MBeanNotificationInfo.toString.

Returns a human readable string containing ModelMBeanNotificationInfo.

Returns:String

a string describing this object.

validDescriptorback to summary
private Descriptor validDescriptor(final Descriptor in) throws RuntimeOperationsException

Clones the passed in Descriptor, sets default values, and checks for validity. If the Descriptor is invalid (for instance by having the wrong "name"), this indicates programming error and a RuntimeOperationsException will be thrown. The following fields will be defaulted if they are not already set: descriptorType="notification",displayName=this.getName(), name=this.getName(),severity="6"

Parameters
in:Descriptor

Descriptor to be checked, or null which is equivalent to an empty Descriptor.

Exceptions
RuntimeOperationsException:
if Descriptor is invalid
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Hides javax.management.MBeanFeatureInfo.writeObject.

Serializes a ModelMBeanNotificationInfo to an ObjectOutputStream.