javax.management.relation
Class RelationNotification

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.management.Notification (src) 
          extended byjavax.management.relation.RelationNotification
All Implemented Interfaces:
java.io.Serializable

public class RelationNotification
extends Notification (src)

A notification from the relation service.

See Also:
Serialized Form

Field Summary
static java.lang.String RELATION_BASIC_CREATION
          Creation of an internal relation.
static java.lang.String RELATION_BASIC_REMOVAL
          Removal of an internal relation.
static java.lang.String RELATION_BASIC_UPDATE
          Update of an internal relation.
static java.lang.String RELATION_MBEAN_CREATION
          Creation of MBean relation added to the relation service.
static java.lang.String RELATION_MBEAN_REMOVAL
          Removal of MBean relation added to the relation service.
static java.lang.String RELATION_MBEAN_UPDATE
          Update of MBean relation added to the relation service.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RelationNotification(java.lang.String type, java.lang.Object source, long sequenceNumber, long timeStamp, java.lang.String message, java.lang.String relationId, java.lang.String relTypeName, ObjectName (src)  relObjName, java.util.List unregMBeans)
          Construct a new relation notification for a creation or removal.
RelationNotification(java.lang.String type, java.lang.Object source, long sequenceNumber, long timeStamp, java.lang.String message, java.lang.String relationId, java.lang.String relTypeName, ObjectName (src)  relObjName, java.lang.String roleName, java.util.List newRoleValue, java.util.List oldRoleValue)
          Construct a new relation notification for an update.
 
Method Summary
 java.util.List getMBeansToUnregister()
          Retrieves a list of Object names of the mbeans that will be removed from the relation service because of a relation's removal.
 java.util.List getNewRoleValue()
          Retrieves the new list of object names in the role.
 ObjectName (src) getObjectName()
          Retrieves the object name of the mbean (null for an internal relation).
 java.util.List getOldRoleValue()
          Retrieves the old list of object names in the role.
 java.lang.String getRelationId()
          Retrieves the relation id of this notification.
 java.lang.String getRelationTypeName()
          Retrieves the relation type name of this notification.
 java.lang.String getRoleName()
          Retrieves the role name of an updated role, only for role updates.
 
Methods inherited from class javax.management.Notification (src)
getMessage, getSequenceNumber, getSource, getTimeStamp, getType, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RELATION_BASIC_CREATION

public static final java.lang.String RELATION_BASIC_CREATION
Creation of an internal relation.

See Also:
Constant Field Values (src)

RELATION_BASIC_REMOVAL

public static final java.lang.String RELATION_BASIC_REMOVAL
Removal of an internal relation.

See Also:
Constant Field Values (src)

RELATION_BASIC_UPDATE

public static final java.lang.String RELATION_BASIC_UPDATE
Update of an internal relation.

See Also:
Constant Field Values (src)

RELATION_MBEAN_CREATION

public static final java.lang.String RELATION_MBEAN_CREATION
Creation of MBean relation added to the relation service.

See Also:
Constant Field Values (src)

RELATION_MBEAN_REMOVAL

public static final java.lang.String RELATION_MBEAN_REMOVAL
Removal of MBean relation added to the relation service.

See Also:
Constant Field Values (src)

RELATION_MBEAN_UPDATE

public static final java.lang.String RELATION_MBEAN_UPDATE
Update of MBean relation added to the relation service.

See Also:
Constant Field Values (src)
Constructor Detail

RelationNotification

public RelationNotification(java.lang.String type,
                            java.lang.Object source,
                            long sequenceNumber,
                            long timeStamp,
                            java.lang.String message,
                            java.lang.String relationId,
                            java.lang.String relTypeName,
                            ObjectName (src)  relObjName,
                            java.util.List unregMBeans)
                     throws java.lang.IllegalArgumentException
Construct a new relation notification for a creation or removal.

The notification type should be one RELATION_BASIC_CREATION, RELATION_BASIC_REMOVAL, RELATION_MBEAN_CREATION or RELATION_MBEAN_REMOVAL.

The relation type cannot be null, the source cannot be null and it must be a relation service, the relation id cannot be null, the relation type name cannot null.

Parameters:
type - the notification type.
source - the object sending the notification (always the the relation service).
sequenceNumber - the number identifying the notification
timeStamp - the time of the notification
message - human readable string
relationId - the relation id
relTypeName - the relation type name
relObjName - the relation MBean object name (null for internal relations)
unregMBeans - the list of object names of mbeans to be unregistered from the relation service because of a relation removal. Only relevant for removals, can be null.
Throws:
java.lang.IllegalArgumentException - for null or invalid parameters.

RelationNotification

public RelationNotification(java.lang.String type,
                            java.lang.Object source,
                            long sequenceNumber,
                            long timeStamp,
                            java.lang.String message,
                            java.lang.String relationId,
                            java.lang.String relTypeName,
                            ObjectName (src)  relObjName,
                            java.lang.String roleName,
                            java.util.List newRoleValue,
                            java.util.List oldRoleValue)
                     throws java.lang.IllegalArgumentException
Construct a new relation notification for an update.

The notification type should be one RELATION_BASIC_UPDATE, RELATION_MBEAN_UPDATE The relation type cannot be null, the source cannot be null and it must be a relation service, the relation id cannot be null, the relation type name cannot null.

Parameters:
type - the notification type.
source - the object sending the notification (always the the relation service).
sequenceNumber - the number identifying the notification
timeStamp - the time of the notification
message - human readable string
relationId - the relation id
relTypeName - the relation type name
relObjName - the relation MBean object name (null for internal relations)
roleName - the role name
newRoleValue - the new value of the role
Throws:
java.lang.IllegalArgumentException - for null or invalid parameters.
Method Detail

getMBeansToUnregister

public java.util.List getMBeansToUnregister()
Retrieves a list of Object names of the mbeans that will be removed from the relation service because of a relation's removal. This is only relevant for relation removal events.

Returns:
the list of removed mbeans.

getNewRoleValue

public java.util.List getNewRoleValue()
Retrieves the new list of object names in the role.

Returns:
the new list.

getObjectName

public ObjectName (src)  getObjectName()
Retrieves the object name of the mbean (null for an internal relation).

Returns:
the relation's object name.

getOldRoleValue

public java.util.List getOldRoleValue()
Retrieves the old list of object names in the role.

Returns:
the old list.

getRelationId

public java.lang.String getRelationId()
Retrieves the relation id of this notification.

Returns:
the relation id.

getRelationTypeName

public java.lang.String getRelationTypeName()
Retrieves the relation type name of this notification.

Returns:
the relation type name.

getRoleName

public java.lang.String getRoleName()
Retrieves the role name of an updated role, only for role updates.

Returns:
the name of the updated role.