|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--javax.management.relation.RelationService
| Constructor Summary | |
RelationService(boolean purgeFlag)
|
|
| Method Summary | |
void |
addRelation(ObjectName objectName)
add a external Relation with it's DEFAULT_OBJECTNAME |
void |
addRelationType(RelationType relationType)
Adds given object as a relation type. |
java.lang.Integer |
checkRoleReading(java.lang.String roleName,
java.lang.String relTypeName)
Checks if given Role can be read in a relation of the given type. |
java.lang.Integer |
checkRoleWriting(Role role,
java.lang.String relTypeName,
java.lang.Boolean initFlag)
Checks if given Role can be set in a relation of given type. |
void |
createRelation(java.lang.String relationId,
java.lang.String relTypeName,
RoleList roleList)
doCreate a internal Relation |
void |
createRelationType(java.lang.String relTypeName,
RoleInfo[] roleInfoArray)
Creates a relation type (a RelationTypeSupport object) with given role infos (provided by the RoleInfo objects), and adds it in the Relation Service. |
java.util.Map |
findAssociatedMBeans(ObjectName objectName,
java.lang.String relTypeName,
java.lang.String roleName)
Retrieves the MBeans associated to given one in a relation. |
java.util.Map |
findReferencingRelations(ObjectName objectName,
java.lang.String relTypeName,
java.lang.String roleName)
Retrieves the relations where a given MBean is referenced. |
java.util.List |
findRelationsOfType(java.lang.String relTypeName)
Returns the relation ids for relations of the given type. |
java.util.List |
getAllRelationIds()
Returns all the relation ids for all the relations handled by the Relation Service |
java.util.List |
getAllRelationTypeNames()
Retrieves names of all known relation types |
RoleResult |
getAllRoles(java.lang.String relationId)
Returns all roles present in the relation |
MBeanNotificationInfo[] |
getNotificationInfo()
Returns a NotificationInfo object contaning the name of the Java class of the notification and the notification types sent. |
boolean |
getPurgeFlag()
Returns the flag to indicate if when a notification is received for the unregistration of a MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called. |
java.util.Map |
getReferencedMBeans(java.lang.String relationId)
Retrieves MBeans referenced in the various roles of the relation. |
java.lang.String |
getRelationTypeName(java.lang.String relationId)
Returns name of associated relation type for given relation. |
java.util.List |
getRole(java.lang.String relationId,
java.lang.String roleName)
Retrieves role value for given role name in given relation. |
java.lang.Integer |
getRoleCardinality(java.lang.String relationId,
java.lang.String roleName)
Retrieves the number of MBeans currently referenced in the given role |
RoleInfo |
getRoleInfo(java.lang.String relTypeName,
java.lang.String roleInfoName)
Retrieves role info for given role of a given relation type |
java.util.List |
getRoleInfos(java.lang.String relTypeName)
Retrieves list of role infos (RoleInfo objects) of a given relation type |
RoleResult |
getRoles(java.lang.String relationId,
java.lang.String[] roleNames)
Retrieves values of roles with given names in given relation. |
void |
handleNotification(Notification notif,
java.lang.Object handback)
Invoked when a JMX notification occurs. |
java.lang.Boolean |
hasRelation(java.lang.String relationId)
Checks if there is a relation identified in Relation Service with given relation id. |
void |
isActive()
Checks if the Relation Service is active. |
java.lang.String |
isRelation(ObjectName objectName)
return relation id (String) or null (if the ObjectName is not a relation handled by the Relation Service) |
ObjectName |
isRelationMBean(java.lang.String relationId)
If the relation is represented by a MBean (created by the user and added as a relation in the Relation Service), returns the ObjectName of the MBean. |
void |
postDeregister()
Allows the MBean to perform any operations needed after having been de-registered in the MBean server. |
void |
postRegister(java.lang.Boolean registrationDone)
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. |
void |
preDeregister()
Allows the MBean to perform any operations it needs before being de-registered by the MBean server. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Allows the MBean to perform any operations it needs before being registered in the MBean server. |
void |
purgeRelations()
Purges the relations. |
void |
removeRelation(java.lang.String relationId)
Removes given relation from the Relation Service. |
void |
removeRelationType(java.lang.String relTypeName)
Removes given relation type from Relation Service. |
void |
sendRelationCreationNotification(java.lang.String relationId)
Sends a notification (RelationNotification) for a relation creation. |
void |
sendRelationRemovalNotification(java.lang.String relationId,
java.util.List unregMBeanList)
Sends a notification (RelationNotification) for a relation removal. |
void |
sendRoleUpdateNotification(java.lang.String relationId,
Role newRole,
java.util.List oldRoleValue)
Sends a notification (RelationNotification) for a role update in the given relation. |
void |
setPurgeFlag(boolean flag)
Sets the flag to indicate if when a notification is received for the unregistration of a MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called. |
void |
setRole(java.lang.String relationId,
Role role)
Sets the given role in given relation. |
RoleResult |
setRoles(java.lang.String relationId,
RoleList roleList)
Sets the given roles in given relation. |
void |
updateRoleMap(java.lang.String relationId,
Role role,
java.util.List oldRoleValue)
Handles update of the Relation Service role map for the update of given role in given relation. |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RelationService(boolean purgeFlag)
| Method Detail |
public void setPurgeFlag(boolean flag)
true is immediate purge.
setPurgeFlag in interface RelationServiceMBeanflag - flagpublic boolean getPurgeFlag()
RelationServiceMBeantrue is immediate purge.
getPurgeFlag in interface RelationServiceMBean
public void isActive()
throws RelationServiceNotRegisteredException
RelationServiceMBeanisActive in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanRelationServiceNotRegisteredException - if it is not
registered
public void createRelationType(java.lang.String relTypeName,
RoleInfo[] roleInfoArray)
throws java.lang.IllegalArgumentException,
InvalidRelationTypeException
createRelationType in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelTypeName - name of the relation typeroleInfoArray - array of role infosjava.lang.IllegalArgumentException - if null parameterInvalidRelationTypeException - If:
- there is already a relation type with that name
- the same name has been used for two different role infos
- no role info provided
- one null role info provided
public void addRelationType(RelationType relationType)
throws java.lang.IllegalArgumentException,
InvalidRelationTypeException
addRelationType in interface RelationServiceMBeanrelationType - relation type object (implementing the
relationType interface)
public void createRelation(java.lang.String relationId,
java.lang.String relTypeName,
RoleList roleList)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RoleNotFoundException,
InvalidRelationIdException,
RelationTypeNotFoundException,
InvalidRoleValueException
createRelation in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation identifier, to uniquely identify the relation
inside the Relation ServicerelTypeName - name of the relation type (has to be created
in the Relation Service)roleList - role list to initialise roles of the relation (can
be null).RelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Serverjava.lang.IllegalArgumentException - if null paramaterRoleNotFoundException - if a value is provided for a role
that does not exist in the relation typeInvalidRelationIdException - if relation id already usedRelationTypeNotFoundException - if relation type not known in
Relation ServiceInvalidRoleValueException - if:
- the same role name is used for two different roles
- the number of referenced MBeans in given value is less than expected minimum degree
- the number of referenced MBeans in provided value exceeds expected maximum degree
- one referenced MBean in the value is not an Object of the MBean class expected for that role
- a MBean provided for that role does not exist
public void addRelation(ObjectName objectName)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
java.lang.NoSuchMethodException,
InvalidRelationIdException,
InstanceNotFoundException,
InvalidRelationServiceException,
RelationTypeNotFoundException,
RoleNotFoundException,
InvalidRoleValueException
addRelation in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanobjectName - ObjectName of the relation MBean to be added.java.lang.IllegalArgumentException - if null parameterRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Serverjava.lang.NoSuchMethodException - If the MBean does not implement the
Relation interfaceInvalidRelationIdException - if:
- no relation identifier in MBean
- the relation identifier is already used in the Relation Service
InstanceNotFoundException - if the MBean for given ObjectName
has not been registeredInvalidRelationServiceException - if:
- no Relation Service name in MBean
- the Relation Service name in the MBean is not the one of the current Relation Service
RelationTypeNotFoundException - if:
- no relation type name in MBean
- the relation type name in MBean does not correspond to a relation type created in the Relation Service
InvalidRoleValueException - if:
- the number of referenced MBeans in a role is less than expected minimum degree
- the number of referenced MBeans in a role exceeds expected maximum degree
- one referenced MBean in the value is not an Object of the MBean class expected for that role
- a MBean provided for a role does not exist
RoleNotFoundException - if a value is provided for a role
that does not exist in the relation typepublic java.util.List getAllRelationTypeNames()
getAllRelationTypeNames in interface RelationServiceMBeanpublic java.util.List getAllRelationIds()
RelationServiceMBeangetAllRelationIds in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBean
public java.util.List getRoleInfos(java.lang.String relTypeName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
getRoleInfos in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelTypeName - name of relation typejava.lang.IllegalArgumentException - if null parameterRelationTypeNotFoundException - if there is no relation type
with that name.
public RoleInfo getRoleInfo(java.lang.String relTypeName,
java.lang.String roleInfoName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException,
RoleInfoNotFoundException
RelationServiceMBeangetRoleInfo in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelTypeName - name of relation typeroleInfoName - name of rolejava.lang.IllegalArgumentException - if null parameterRelationTypeNotFoundException - if the relation type is not
known in the Relation ServiceRoleInfoNotFoundException - if the role is not part of the
relation type.
public RoleResult getAllRoles(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException,
RelationServiceNotRegisteredException
RelationServiceMBeangetAllRoles in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation idjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation for given idRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Server
public java.util.List getRole(java.lang.String relationId,
java.lang.String roleName)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RelationNotFoundException,
RoleNotFoundException
RelationServiceMBeangetRole in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation idroleName - name of roleRelationServiceNotRegisteredException - if the Relation
Service is not registeredjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation with given idRoleNotFoundException - if:
- there is no role with given name
or
- the role is not readable.
public java.lang.Integer getRoleCardinality(java.lang.String relationId,
java.lang.String roleName)
throws java.lang.IllegalArgumentException,
RelationNotFoundException,
RoleNotFoundException
RelationServiceMBeangetRoleCardinality in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation idroleName - name of rolejava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation with given idRoleNotFoundException - if there is no role with given name
public RoleResult getRoles(java.lang.String relationId,
java.lang.String[] roleNames)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RelationNotFoundException
RelationServiceMBeangetRoles in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation idroleNames - array of names of roles to be retrievedRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Serverjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation with given id
public java.util.List findRelationsOfType(java.lang.String relTypeName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
RelationServiceMBeanfindRelationsOfType in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelTypeName - relation type namejava.lang.IllegalArgumentException - if null parameterRelationTypeNotFoundException - if there is no relation type
with that name.
public java.util.Map findReferencingRelations(ObjectName objectName,
java.lang.String relTypeName,
java.lang.String roleName)
throws java.lang.IllegalArgumentException
findReferencingRelations in interface RelationServiceMBeanobjectName - ObjectName of MBeanrelTypeName - can be null; if specified, only the relations
of that type will be considered in the search. Else all relation types
are considered.roleName - can be null; if specified, only the relations
where the MBean is referenced in that role will be returned. Else all
roles are considered.
public java.util.Map findAssociatedMBeans(ObjectName objectName,
java.lang.String relTypeName,
java.lang.String roleName)
throws java.lang.IllegalArgumentException
This corresponds to CIM Associators and AssociatorNames operations.
findAssociatedMBeans in interface RelationServiceMBeanobjectName - ObjectName of MBeanrelTypeName - can be null; if specified, only the relations
of that type will be considered in the search. Else all
relation types are considered.roleName - can be null; if specified, only the relations
where the MBean is referenced in that role will be considered. Else all
roles are considered.java.lang.IllegalArgumentException - if null parameter
public java.util.Map getReferencedMBeans(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
getReferencedMBeans in interface RelationServiceMBeanrelationId - relation idObjectName -> ArrayList of String (role names)
public java.lang.String getRelationTypeName(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
RelationServiceMBeangetRelationTypeName in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation idjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation for given
relation id
public java.lang.Boolean hasRelation(java.lang.String relationId)
throws java.lang.IllegalArgumentException
RelationServiceMBeanhasRelation in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation id identifying the relationjava.lang.IllegalArgumentException - if null parameter
public java.lang.String isRelation(ObjectName objectName)
throws java.lang.IllegalArgumentException
isRelation in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanobjectName - ObjectName of supposed relationjava.lang.IllegalArgumentException - if null parameter
public ObjectName isRelationMBean(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
isRelationMBean in interface RelationServiceMBean
public java.lang.Integer checkRoleReading(java.lang.String roleName,
java.lang.String relTypeName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
RelationServiceMBeancheckRoleReading in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanroleName - name of role to be checkedrelaionTypeName - name of the relation type- 0 if role can be read
- integer corresponding to RoleStatus.NO_ROLE_WITH_NAME
- integer corresponding to RoleStatus.ROLE_NOT_READABLE
java.lang.IllegalArgumentException - if null parameterRelationTypeNotFoundException - if the relation type is not
known in the Relation Service
public java.lang.Integer checkRoleWriting(Role role,
java.lang.String relTypeName,
java.lang.Boolean initFlag)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
RelationServiceMBeancheckRoleWriting in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrole - role to be checkedrelTypeName - name of relation typeinitFlag - flag to specify that the checking is done for the
initialisation of a role, write access shall not be verified.- 0 if role can be set
- integer corresponding to RoleStatus.NO_ROLE_WITH_NAME
- integer for RoleStatus.ROLE_NOT_WRITABLE
- integer for RoleStatus.LESS_THAN_MIN_ROLE_DEGREE
- integer for RoleStatus.MORE_THAN_MAX_ROLE_DEGREE
- integer for RoleStatus.REF_MBEAN_OF_INCORRECT_CLASS
- integer for RoleStatus.REF_MBEAN_NOT_REGISTERED
java.lang.IllegalArgumentException - if null parameterRelationTypeNotFoundException - if unknown relation type
public void handleNotification(Notification notif,
java.lang.Object handback)
handleNotification in interface NotificationListenernotif - The notification.handback - An opaque object which helps the listener to
associate information regarding the MBean emitter (can be null).
public void removeRelationType(java.lang.String relTypeName)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RelationTypeNotFoundException
RelationServiceMBeanThe relation objects of that type will be removed from the Relation Service.
removeRelationType in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelTypeName - name of the relation type to be removedRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Serverjava.lang.IllegalArgumentException - if null parameterRelationTypeNotFoundException - If there is no relation type
with that name
public void setRole(java.lang.String relationId,
Role role)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RelationNotFoundException,
RoleNotFoundException,
InvalidRoleValueException
RelationServiceMBeanWill check the role according to its corresponding role definition provided in relation's relation type
The Relation Service will keep track of the change to keep the consistency of relations by handling referenced MBean unregistrations.
setRole in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation idrole - role to be set (name and new value)RelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Serverjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation with given idRoleNotFoundException - if:
- internal relation
and
- the role does not exist or is not writable
InvalidRoleValueException - if internal relation and value
provided for role is not valid:
- the number of referenced MBeans in given value is less than expected minimum degree
or
- the number of referenced MBeans in provided value exceeds expected maximum degree
or
- one referenced MBean in the value is not an Object of the MBean class expected for that role
or
- a MBean provided for that role does not exist
RelationTypeNotFoundException - if unknown relation type
public RoleResult setRoles(java.lang.String relationId,
RoleList roleList)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RelationNotFoundException
RelationServiceMBeanWill check the role according to its corresponding role definition provided in relation's relation type
The Relation Service keeps track of the changes to keep the consistency of relations by handling referenced MBean unregistrations.
setRoles in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation idroleList - list of roles to be setRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Serverjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation with given id
public void updateRoleMap(java.lang.String relationId,
Role role,
java.util.List oldRoleValue)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationNotFoundException
RelationServiceMBeanIt is called in relation MBean setRole() (for given role) and setRoles() (for each role) methods (implementation provided in RelationSupport class).
It is also called in Relation Service setRole() (for given role) and setRoles() (for each role) methods.
To allow the Relation Service to maintain the consistency (in case of MBean unregistration) and to be able to perform queries, this method must be called when a role is updated.
updateRoleMap in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation identifier of the updated relationrole - new role (name and new value)oldRoleValue - old role value (ArrayList of ObjectName objects)java.lang.IllegalArgumentException - if null parameterRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean ServerRelationNotFoundException - if no relation for given id.
public void purgeRelations()
throws RelationServiceNotRegisteredException
RelationServiceMBeanDepending on the purgeFlag value, this method is either called automatically when a notification is received for the unregistration of a MBean referenced in a relation (if the flag is set to true), or not (if the flag is set to false).
In that case it is up to the user to call it to maintain the consistency of the relations. To be kept in mind that if a MBean is unregistered and the purge not done immediately, if the ObjectName is reused and assigned to another MBean referenced in a relation, calling manually this purgeRelations() method will cause trouble, as will consider the ObjectName as corresponding to the unregistered MBean, not seeing the new one.
The behavior depends on the cardinality of the role where the unregistered MBean is referenced:
- if removing one MBean reference in the role makes its number of references less than the minimum degree, the relation has to be removed.
- if the remaining number of references after removing the MBean reference is still in the cardinality range, keep the relation and update it calling its handleMBeanUnregistration() callback.
purgeRelations in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Server.
public void removeRelation(java.lang.String relationId)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RelationNotFoundException
RelationServiceMBeanA RelationNotification notification is sent, its type being:
- RelationNotification.RELATION_BASIC_REMOVAL if the relation was only internal to the Relation Service
- RelationNotification.RELATION_MBEAN_REMOVAL if the relation is registered as a MBean.
For MBeans referenced in such relation, nothing will be done,
removeRelation in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation id of the relation to be removedRelationServiceNotRegisteredException - if the Relation
Service is not registered in the MBean Serverjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if no relation corresponding to
given relation id
public void sendRelationCreationNotification(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
RelationServiceMBean- RelationNotification.RELATION_BASIC_CREATION if the relation is an object internal to the Relation Service
- RelationNotification.RELATION_MBEAN_CREATION if the relation is a MBean added as a relation.
The source object is the Relation Service itself.
It is called in Relation Service createRelation() and addRelation() methods.
sendRelationCreationNotification in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation identifier of the updated relationjava.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if there is no relation for given
relation id
public void sendRelationRemovalNotification(java.lang.String relationId,
java.util.List unregMBeanList)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
RelationServiceMBean- RelationNotification.RELATION_BASIC_REMOVAL if the relation is an object internal to the Relation Service
- RelationNotification.RELATION_MBEAN_REMOVAL if the relation is a MBean added as a relation.
The source object is the Relation Service itself.
It is called in Relation Service removeRelation() method.
sendRelationRemovalNotification in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelaionId - relation identifier of the updated relationunregMBeanList - ArrayList of ObjectNames of MBeans expected
to be unregistered due to relation removal (can be null)java.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if there is no relation for given
relation id
public void sendRoleUpdateNotification(java.lang.String relationId,
Role newRole,
java.util.List oldRoleValue)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
RelationServiceMBean- RelationNotification.RELATION_BASIC_UPDATE if the relation is an object internal to the Relation Service
- RelationNotification.RELATION_MBEAN_UPDATE if the relation is a MBean added as a relation.
The source object is the Relation Service itself.
It is called in relation MBean setRole() (for given role) and setRoles() (for each role) methods (implementation provided in RelationSupport class).
It is also called in Relation Service setRole() (for given role) and setRoles() (for each role) methods.
sendRoleUpdateNotification in interface RelationServiceMBeanjavax.management.relation.RelationServiceMBeanrelationId - relation identifier of the updated relationnewRole - new role (name and new value)oldRoleValue - old role value (ArrayList of ObjectName objects)java.lang.IllegalArgumentException - if null parameterRelationNotFoundException - if there is no relation for given
relation idpublic MBeanNotificationInfo[] getNotificationInfo()
NotificationBroadcasterSupportgetNotificationInfo in class NotificationBroadcasterSupport
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws java.lang.Exception
MBeanRegistrationpreRegister in interface MBeanRegistrationjavax.management.MBeanRegistrationserver - The MBean server in which the MBean will be registered.name - The object name of the MBean.java.lang.Exception - This exception should be caught by the MBean server and re-thrown
as an MBeanRegistrationException.public void postRegister(java.lang.Boolean registrationDone)
MBeanRegistrationpostRegister in interface MBeanRegistrationjavax.management.MBeanRegistrationregistrationDone - Indicates whether or not the MBean has been successfully registered in
the MBean server. The value false means that the registration phase has failed.
public void preDeregister()
throws java.lang.Exception
MBeanRegistrationpreDeregister in interface MBeanRegistrationjavax.management.MBeanRegistrationjava.lang.Exception - This exception should be caught by the MBean server and re-thrown
as an MBeanRegistrationException.public void postDeregister()
MBeanRegistrationpostDeregister in interface MBeanRegistration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||