Package Summary  Overview Summary

class:RelationService [NONE]

constructor:RelationService(boolean) [CHANGED]

  • RelationService

    public RelationServicepublic RelationService​(boolean immediatePurgeFlag)
    Constructor.
    Parameters:
    immediatePurgeFlag - flag to indicate when a notification is received for the unregistration of an 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.

    true is immediate purge.

  • RelationService

    public RelationService(boolean immediatePurgeFlag)
    Constructor.
    Parameters:
    immediatePurgeFlag - flag to indicate when a notification is received for the unregistration of an 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.

    true is immediate purge.

  • RelationService

    public RelationService​(boolean immediatePurgeFlag)
    Constructor.
    Parameters:
    immediatePurgeFlag - flag to indicate when a notification is received for the unregistration of an 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.

    true is immediate purge.

method:isActive() [CHANGED]

method:preRegister(javax.management.MBeanServer, javax.management.ObjectName) [CHANGED]

  • preRegister

    public ObjectName preRegister preRegister​(MBeanServer server,
                                  ObjectName name)
                           throws Exception
    
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations it needs before being registered in the MBean Server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean Server.
    Specified by:
    preRegister in interface MBeanRegistration
    Parameters:
    server - The MBean Server in which the MBean will be registered.
    name - The object name of the MBean. This name is null if the name parameter to one of the createMBean or registerMBean methods in the MBeanServer interface is null. In that case, this method must return a non-null ObjectName for the new MBean.
    Returns:
    The name under which the MBean is to be registered. This value must not be null. If the name parameter is not null, it will usually but not necessarily be the returned value.
    Throws:
    Exception - This exception will be caught by the MBean Server and re-thrown as an MBeanRegistrationException.
  • preRegister

    public ObjectName preRegister(MBeanServer server,
                                  ObjectName name)
                           throws Exception
    
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations it needs before being registered in the MBean Server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean Server.
    Specified by:
    preRegister in interface MBeanRegistration
    Parameters:
    server - The MBean Server in which the MBean will be registered.
    name - The object name of the MBean. This name is null if the name parameter to one of the createMBean or registerMBean methods in the MBeanServer interface is null. In that case, this method must return a non-null ObjectName for the new MBean.
    Returns:
    The name under which the MBean is to be registered. This value must not be null. If the name parameter is not null, it will usually but not necessarily be the returned value.
    Throws:
    Exception - This exception will be caught by the MBean Server and re-thrown as an MBeanRegistrationException.
  • preRegister

    public ObjectName preRegister​(MBeanServer server,
                                  ObjectName name)
                           throws Exception
    
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations it needs before being registered in the MBean Server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean Server.
    Specified by:
    preRegister in interface MBeanRegistration
    Parameters:
    server - The MBean Server in which the MBean will be registered.
    name - The object name of the MBean. This name is null if the name parameter to one of the createMBean or registerMBean methods in the MBeanServer interface is null. In that case, this method must return a non-null ObjectName for the new MBean.
    Returns:
    The name under which the MBean is to be registered. This value must not be null. If the name parameter is not null, it will usually but not necessarily be the returned value.
    Throws:
    Exception - This exception will be caught by the MBean Server and re-thrown as an MBeanRegistrationException.

method:postRegister(java.lang.Boolean) [CHANGED]

  • postRegister

    public void postRegisterpublic void postRegister​(Boolean registrationDone)
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

    If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postRegister will not change the state of the MBean: if the MBean was already registered (registrationDone is true), the MBean will remain registered.

    This might be confusing for the code calling createMBean() or registerMBean(), as such code might assume that MBean registration has failed when such an exception is raised. Therefore it is recommended that implementations of postRegister do not throw Runtime Exceptions or Errors if it can be avoided.

    Specified by:
    postRegister in interface MBeanRegistration
    Parameters:
    registrationDone - Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.
  • postRegister

    public void postRegister(Boolean registrationDone)
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

    If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postRegister will not change the state of the MBean: if the MBean was already registered (registrationDone is true), the MBean will remain registered.

    This might be confusing for the code calling createMBean() or registerMBean(), as such code might assume that MBean registration has failed when such an exception is raised. Therefore it is recommended that implementations of postRegister do not throw Runtime Exceptions or Errors if it can be avoided.

    Specified by:
    postRegister in interface MBeanRegistration
    Parameters:
    registrationDone - Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.
  • postRegister

    public void postRegister​(Boolean registrationDone)
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

    If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postRegister will not change the state of the MBean: if the MBean was already registered (registrationDone is true), the MBean will remain registered.

    This might be confusing for the code calling createMBean() or registerMBean(), as such code might assume that MBean registration has failed when such an exception is raised. Therefore it is recommended that implementations of postRegister do not throw Runtime Exceptions or Errors if it can be avoided.

    Specified by:
    postRegister in interface MBeanRegistration
    Parameters:
    registrationDone - Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.

method:preDeregister() [CHANGED]

method:postDeregister() [CHANGED]

  • postDeregister

    public void postDeregisterpublic void postDeregister​()
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

    If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postDeregister will not change the state of the MBean: the MBean was already successfully deregistered and will remain so.

    This might be confusing for the code calling unregisterMBean(), as it might assume that MBean deregistration has failed. Therefore it is recommended that implementations of postDeregister do not throw Runtime Exceptions or Errors if it can be avoided.

    Specified by:
    postDeregister in interface MBeanRegistration
  • postDeregister

    public void postDeregister()
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

    If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postDeregister will not change the state of the MBean: the MBean was already successfully deregistered and will remain so.

    This might be confusing for the code calling unregisterMBean(), as it might assume that MBean deregistration has failed. Therefore it is recommended that implementations of postDeregister do not throw Runtime Exceptions or Errors if it can be avoided.

    Specified by:
    postDeregister in interface MBeanRegistration
  • postDeregister

    public void postDeregister​()
    Description copied from interface: MBeanRegistration
    Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

    If the implementation of this method throws a RuntimeException or an Error, the MBean Server will rethrow those inside a RuntimeMBeanException or RuntimeErrorException, respectively. However, throwing an exception in postDeregister will not change the state of the MBean: the MBean was already successfully deregistered and will remain so.

    This might be confusing for the code calling unregisterMBean(), as it might assume that MBean deregistration has failed. Therefore it is recommended that implementations of postDeregister do not throw Runtime Exceptions or Errors if it can be avoided.

    Specified by:
    postDeregister in interface MBeanRegistration

method:getPurgeFlag() [CHANGED]

  • getPurgeFlag

    public boolean getPurgeFlagpublic boolean getPurgeFlag​()
    Returns the flag to indicate if when a notification is received for the unregistration of an 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.

    true is immediate purge.

    Specified by:
    getPurgeFlag in interface RelationServiceMBean
    Returns:
    true if purges are automatic.
    See Also:
    setPurgeFlag(boolean)
  • getPurgeFlag

    public boolean getPurgeFlag()
    Returns the flag to indicate if when a notification is received for the unregistration of an 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.

    true is immediate purge.

    Specified by:
    getPurgeFlag in interface RelationServiceMBean
    Returns:
    true if purges are automatic.
    See Also:
    setPurgeFlag(boolean)
  • getPurgeFlag

    public boolean getPurgeFlag​()
    Returns the flag to indicate if when a notification is received for the unregistration of an 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.

    true is immediate purge.

    Specified by:
    getPurgeFlag in interface RelationServiceMBean
    Returns:
    true if purges are automatic.
    See Also:
    setPurgeFlag(boolean)

method:setPurgeFlag(boolean) [CHANGED]

  • setPurgeFlag

    public void setPurgeFlagpublic void setPurgeFlag​(boolean purgeFlag)
    Sets the flag to indicate if when a notification is received for the unregistration of an 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.

    true is immediate purge.

    Specified by:
    setPurgeFlag in interface RelationServiceMBean
    Parameters:
    purgeFlag - flag
    See Also:
    getPurgeFlag()
  • setPurgeFlag

    public void setPurgeFlag(boolean purgeFlag)
    Sets the flag to indicate if when a notification is received for the unregistration of an 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.

    true is immediate purge.

    Specified by:
    setPurgeFlag in interface RelationServiceMBean
    Parameters:
    purgeFlag - flag
    See Also:
    getPurgeFlag()
  • setPurgeFlag

    public void setPurgeFlag​(boolean purgeFlag)
    Sets the flag to indicate if when a notification is received for the unregistration of an 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.

    true is immediate purge.

    Specified by:
    setPurgeFlag in interface RelationServiceMBean
    Parameters:
    purgeFlag - flag
    See Also:
    getPurgeFlag()

method:createRelationType(java.lang.String, javax.management.relation.RoleInfo[]) [CHANGED]

method:addRelationType(javax.management.relation.RelationType) [CHANGED]

method:getAllRelationTypeNames() [CHANGED]

  • getAllRelationTypeNames

    public List<String> getAllRelationTypeNames> getAllRelationTypeNames​()
    Retrieves names of all known relation types.
    Specified by:
    getAllRelationTypeNames in interface RelationServiceMBean
    Returns:
    ArrayList of relation type names (Strings)

method:getRoleInfos(java.lang.String) [CHANGED]

method:getRoleInfo(java.lang.String, java.lang.String) [CHANGED]

method:removeRelationType(java.lang.String) [CHANGED]

method:createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList) [CHANGED]

method:addRelation(javax.management.ObjectName) [CHANGED]

method:isRelationMBean(java.lang.String) [CHANGED]

method:isRelation(javax.management.ObjectName) [CHANGED]

  • isRelation

    public String isRelation isRelation​(ObjectName objectName)
                      throws IllegalArgumentException
    
    Returns the relation id associated to the given ObjectName if the MBean has been added as a relation in the Relation Service.
    Specified by:
    isRelation in interface RelationServiceMBean
    Parameters:
    objectName - ObjectName of supposed relation
    Returns:
    relation id (String) or null (if the ObjectName is not a relation handled by the Relation Service)
    Throws:
    IllegalArgumentException - if null parameter
  • isRelation

    public String isRelation(ObjectName objectName)
                      throws IllegalArgumentException
    
    Returns the relation id associated to the given ObjectName if the MBean has been added as a relation in the Relation Service.
    Specified by:
    isRelation in interface RelationServiceMBean
    Parameters:
    objectName - ObjectName of supposed relation
    Returns:
    relation id (String) or null (if the ObjectName is not a relation handled by the Relation Service)
    Throws:
    IllegalArgumentException - if null parameter
  • isRelation

    public String isRelation​(ObjectName objectName)
                      throws IllegalArgumentException
    
    Returns the relation id associated to the given ObjectName if the MBean has been added as a relation in the Relation Service.
    Specified by:
    isRelation in interface RelationServiceMBean
    Parameters:
    objectName - ObjectName of supposed relation
    Returns:
    relation id (String) or null (if the ObjectName is not a relation handled by the Relation Service)
    Throws:
    IllegalArgumentException - if null parameter

method:hasRelation(java.lang.String) [CHANGED]

method:getAllRelationIds() [CHANGED]

  • getAllRelationIds

    public List<String> getAllRelationIds> getAllRelationIds​()
    Returns all the relation ids for all the relations handled by the Relation Service.
    Specified by:
    getAllRelationIds in interface RelationServiceMBean
    Returns:
    ArrayList of String
  • getAllRelationIds

    public List<String> getAllRelationIds()
    Returns all the relation ids for all the relations handled by the Relation Service.
    Specified by:
    getAllRelationIds in interface RelationServiceMBean
    Returns:
    ArrayList of String
  • getAllRelationIds

    public List<String> getAllRelationIds​()
    Returns all the relation ids for all the relations handled by the Relation Service.
    Specified by:
    getAllRelationIds in interface RelationServiceMBean
    Returns:
    ArrayList of String

method:checkRoleReading(java.lang.String, java.lang.String) [CHANGED]

  • checkRoleReading

    public Integer checkRoleReading checkRoleReading​(String roleName,
                                    String relationTypeName)
                             throws IllegalArgumentException,
                                    RelationTypeNotFoundException
    
    Checks if given Role can be read in a relation of the given type.
    Specified by:
    checkRoleReading in interface RelationServiceMBean
    Parameters:
    roleName - name of role to be checked
    relationTypeName - name of the relation type
    Returns:
    an Integer wrapping an integer corresponding to possible problems represented as constants in RoleUnresolved:

    - 0 if role can be read

    - integer corresponding to RoleStatus.NO_ROLE_WITH_NAME

    - integer corresponding to RoleStatus.ROLE_NOT_READABLE

    Throws:
    IllegalArgumentException - if null parameter
    RelationTypeNotFoundException - if the relation type is not known in the Relation Service

method:checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean) [CHANGED]

  • checkRoleWriting

    public Integer checkRoleWriting checkRoleWriting​(Role role,
                                    String relationTypeName,
                                    Boolean initFlag)
                             throws IllegalArgumentException,
                                    RelationTypeNotFoundException
    
    Checks if given Role can be set in a relation of given type.
    Specified by:
    checkRoleWriting in interface RelationServiceMBean
    Parameters:
    role - role to be checked
    relationTypeName - name of relation type
    initFlag - flag to specify that the checking is done for the initialization of a role, write access shall not be verified.
    Returns:
    an Integer wrapping an integer corresponding to possible problems represented as constants in RoleUnresolved:

    - 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

    Throws:
    IllegalArgumentException - if null parameter
    RelationTypeNotFoundException - if unknown relation type
  • checkRoleWriting

    public Integer checkRoleWriting(Role role,
                                    String relationTypeName,
                                    Boolean initFlag)
                             throws IllegalArgumentException,
                                    RelationTypeNotFoundException
    
    Checks if given Role can be set in a relation of given type.
    Specified by:
    checkRoleWriting in interface RelationServiceMBean
    Parameters:
    role - role to be checked
    relationTypeName - name of relation type
    initFlag - flag to specify that the checking is done for the initialization of a role, write access shall not be verified.
    Returns:
    an Integer wrapping an integer corresponding to possible problems represented as constants in RoleUnresolved:

    - 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

    Throws:
    IllegalArgumentException - if null parameter
    RelationTypeNotFoundException - if unknown relation type
  • checkRoleWriting

    public Integer checkRoleWriting​(Role role,
                                    String relationTypeName,
                                    Boolean initFlag)
                             throws IllegalArgumentException,
                                    RelationTypeNotFoundException
    
    Checks if given Role can be set in a relation of given type.
    Specified by:
    checkRoleWriting in interface RelationServiceMBean
    Parameters:
    role - role to be checked
    relationTypeName - name of relation type
    initFlag - flag to specify that the checking is done for the initialization of a role, write access shall not be verified.
    Returns:
    an Integer wrapping an integer corresponding to possible problems represented as constants in RoleUnresolved:

    - 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

    Throws:
    IllegalArgumentException - if null parameter
    RelationTypeNotFoundException - if unknown relation type

method:sendRelationCreationNotification(java.lang.String) [CHANGED]

  • sendRelationCreationNotification

    public void sendRelationCreationNotificationpublic void sendRelationCreationNotification​(String relationId)
                                          throws IllegalArgumentException,
                                                 RelationNotFoundException
    
    Sends a notification (RelationNotification) for a relation creation. The notification type is:

    - 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.

    Specified by:
    sendRelationCreationNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id
  • sendRelationCreationNotification

    public void sendRelationCreationNotification(String relationId)
                                          throws IllegalArgumentException,
                                                 RelationNotFoundException
    
    Sends a notification (RelationNotification) for a relation creation. The notification type is:

    - 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.

    Specified by:
    sendRelationCreationNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id
  • sendRelationCreationNotification

    public void sendRelationCreationNotification​(String relationId)
                                          throws IllegalArgumentException,
                                                 RelationNotFoundException
    
    Sends a notification (RelationNotification) for a relation creation. The notification type is:

    - 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.

    Specified by:
    sendRelationCreationNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id

method:sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List) [CHANGED]

  • sendRoleUpdateNotification

    public void sendRoleUpdateNotificationpublic void sendRoleUpdateNotification​(String relationId,
                                           Role newRole,
                                           List<ObjectName> oldValue)
                                    throws IllegalArgumentException,
                                           RelationNotFoundException
    
    Sends a notification (RelationNotification) for a role update in the given relation. The notification type is:

    - 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.

    Specified by:
    sendRoleUpdateNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    newRole - new role (name and new value)
    oldValue - old role value (List of ObjectName objects)
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id
  • sendRoleUpdateNotification

    public void sendRoleUpdateNotification(String relationId,
                                           Role newRole,
                                           List<ObjectName> oldValue)
                                    throws IllegalArgumentException,
                                           RelationNotFoundException
    
    Sends a notification (RelationNotification) for a role update in the given relation. The notification type is:

    - 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.

    Specified by:
    sendRoleUpdateNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    newRole - new role (name and new value)
    oldValue - old role value (List of ObjectName objects)
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id
  • sendRoleUpdateNotification

    public void sendRoleUpdateNotification​(String relationId,
                                           Role newRole,
                                           List<ObjectName> oldValue)
                                    throws IllegalArgumentException,
                                           RelationNotFoundException
    
    Sends a notification (RelationNotification) for a role update in the given relation. The notification type is:

    - 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.

    Specified by:
    sendRoleUpdateNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    newRole - new role (name and new value)
    oldValue - old role value (List of ObjectName objects)
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id

method:sendRelationRemovalNotification(java.lang.String, java.util.List) [CHANGED]

  • sendRelationRemovalNotification

    public void sendRelationRemovalNotificationpublic void sendRelationRemovalNotification​(String relationId,
                                                List<ObjectName> unregMBeanList)
                                         throws IllegalArgumentException,
                                                RelationNotFoundException
    
    Sends a notification (RelationNotification) for a relation removal. The notification type is:

    - 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.

    Specified by:
    sendRelationRemovalNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    unregMBeanList - List of ObjectNames of MBeans expected to be unregistered due to relation removal (can be null)
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id
  • sendRelationRemovalNotification

    public void sendRelationRemovalNotification(String relationId,
                                                List<ObjectName> unregMBeanList)
                                         throws IllegalArgumentException,
                                                RelationNotFoundException
    
    Sends a notification (RelationNotification) for a relation removal. The notification type is:

    - 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.

    Specified by:
    sendRelationRemovalNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    unregMBeanList - List of ObjectNames of MBeans expected to be unregistered due to relation removal (can be null)
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id
  • sendRelationRemovalNotification

    public void sendRelationRemovalNotification​(String relationId,
                                                List<ObjectName> unregMBeanList)
                                         throws IllegalArgumentException,
                                                RelationNotFoundException
    
    Sends a notification (RelationNotification) for a relation removal. The notification type is:

    - 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.

    Specified by:
    sendRelationRemovalNotification in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    unregMBeanList - List of ObjectNames of MBeans expected to be unregistered due to relation removal (can be null)
    Throws:
    IllegalArgumentException - if null parameter
    RelationNotFoundException - if there is no relation for given relation id

method:updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List) [CHANGED]

  • updateRoleMap

    public void updateRoleMappublic void updateRoleMap​(String relationId,
                              Role newRole,
                              List<ObjectName> oldValue)
                       throws IllegalArgumentException,
                              RelationServiceNotRegisteredException,
                              RelationNotFoundException
    
    Handles update of the Relation Service role map for the update of given role in given relation.

    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.

    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.

    Specified by:
    updateRoleMap in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    newRole - new role (name and new value)
    oldValue - old role value (List of ObjectName objects)
    Throws:
    IllegalArgumentException - if null parameter
    RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
    RelationNotFoundException - if no relation for given id.
  • updateRoleMap

    public void updateRoleMap(String relationId,
                              Role newRole,
                              List<ObjectName> oldValue)
                       throws IllegalArgumentException,
                              RelationServiceNotRegisteredException,
                              RelationNotFoundException
    
    Handles update of the Relation Service role map for the update of given role in given relation.

    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.

    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.

    Specified by:
    updateRoleMap in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    newRole - new role (name and new value)
    oldValue - old role value (List of ObjectName objects)
    Throws:
    IllegalArgumentException - if null parameter
    RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
    RelationNotFoundException - if no relation for given id.
  • updateRoleMap

    public void updateRoleMap​(String relationId,
                              Role newRole,
                              List<ObjectName> oldValue)
                       throws IllegalArgumentException,
                              RelationServiceNotRegisteredException,
                              RelationNotFoundException
    
    Handles update of the Relation Service role map for the update of given role in given relation.

    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.

    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.

    Specified by:
    updateRoleMap in interface RelationServiceMBean
    Parameters:
    relationId - relation identifier of the updated relation
    newRole - new role (name and new value)
    oldValue - old role value (List of ObjectName objects)
    Throws:
    IllegalArgumentException - if null parameter
    RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
    RelationNotFoundException - if no relation for given id.

method:removeRelation(java.lang.String) [CHANGED]

method:purgeRelations() [CHANGED]

  • purgeRelations

    public void purgeRelationspublic void purgeRelations​()
                        throws RelationServiceNotRegisteredException
    
    Purges the relations.

    Depending on the purgeFlag value, this method is either called automatically when a notification is received for the unregistration of an 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 an 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.

    Specified by:
    purgeRelations in interface RelationServiceMBean
    Throws:
    RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server.
  • purgeRelations

    public void purgeRelations()
                        throws RelationServiceNotRegisteredException
    
    Purges the relations.

    Depending on the purgeFlag value, this method is either called automatically when a notification is received for the unregistration of an 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 an 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.

    Specified by:
    purgeRelations in interface RelationServiceMBean
    Throws:
    RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server.
  • purgeRelations

    public void purgeRelations​()
                        throws RelationServiceNotRegisteredException
    
    Purges the relations.

    Depending on the purgeFlag value, this method is either called automatically when a notification is received for the unregistration of an 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 an 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.

    Specified by:
    purgeRelations in interface RelationServiceMBean
    Throws:
    RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server.

method:findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String) [CHANGED]

  • findReferencingRelations

    public Map<String,List<String>> findReferencingRelations>> findReferencingRelations​(ObjectName mbeanName,
                                                             String relationTypeName,
                                                             String roleName)
                                                      throws IllegalArgumentException
    
    Retrieves the relations where a given MBean is referenced.

    This corresponds to the CIM "References" and "ReferenceNames" operations.

    Specified by:
    findReferencingRelations in interface RelationServiceMBean
    Parameters:
    mbeanName - ObjectName of MBean
    relationTypeName - 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.
    Returns:
    an HashMap, where the keys are the relation ids of the relations where the MBean is referenced, and the value is, for each key, an ArrayList of role names (as an MBean can be referenced in several roles in the same relation).
    Throws:
    IllegalArgumentException - if null parameter
  • findReferencingRelations

    public Map<String,List<String>> findReferencingRelations(ObjectName mbeanName,
                                                             String relationTypeName,
                                                             String roleName)
                                                      throws IllegalArgumentException
    
    Retrieves the relations where a given MBean is referenced.

    This corresponds to the CIM "References" and "ReferenceNames" operations.

    Specified by:
    findReferencingRelations in interface RelationServiceMBean
    Parameters:
    mbeanName - ObjectName of MBean
    relationTypeName - 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.
    Returns:
    an HashMap, where the keys are the relation ids of the relations where the MBean is referenced, and the value is, for each key, an ArrayList of role names (as an MBean can be referenced in several roles in the same relation).
    Throws:
    IllegalArgumentException - if null parameter
  • findReferencingRelations

    public Map<String,List<String>> findReferencingRelations​(ObjectName mbeanName,
                                                             String relationTypeName,
                                                             String roleName)
                                                      throws IllegalArgumentException
    
    Retrieves the relations where a given MBean is referenced.

    This corresponds to the CIM "References" and "ReferenceNames" operations.

    Specified by:
    findReferencingRelations in interface RelationServiceMBean
    Parameters:
    mbeanName - ObjectName of MBean
    relationTypeName - 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.
    Returns:
    an HashMap, where the keys are the relation ids of the relations where the MBean is referenced, and the value is, for each key, an ArrayList of role names (as an MBean can be referenced in several roles in the same relation).
    Throws:
    IllegalArgumentException - if null parameter

method:findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String) [CHANGED]

  • findAssociatedMBeans

    public Map<ObjectName,List<String>> findAssociatedMBeans>> findAssociatedMBeans​(ObjectName mbeanName,
                                                             String relationTypeName,
                                                             String roleName)
                                                      throws IllegalArgumentException
    
    Retrieves the MBeans associated to given one in a relation.

    This corresponds to CIM Associators and AssociatorNames operations.

    Specified by:
    findAssociatedMBeans in interface RelationServiceMBean
    Parameters:
    mbeanName - ObjectName of MBean
    relationTypeName - 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.
    Returns:
    an HashMap, where the keys are the ObjectNames of the MBeans associated to given MBean, and the value is, for each key, an ArrayList of the relation ids of the relations where the key MBean is associated to given one (as they can be associated in several different relations).
    Throws:
    IllegalArgumentException - if null parameter
  • findAssociatedMBeans

    public Map<ObjectName,List<String>> findAssociatedMBeans(ObjectName mbeanName,
                                                             String relationTypeName,
                                                             String roleName)
                                                      throws IllegalArgumentException
    
    Retrieves the MBeans associated to given one in a relation.

    This corresponds to CIM Associators and AssociatorNames operations.

    Specified by:
    findAssociatedMBeans in interface RelationServiceMBean
    Parameters:
    mbeanName - ObjectName of MBean
    relationTypeName - 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.
    Returns:
    an HashMap, where the keys are the ObjectNames of the MBeans associated to given MBean, and the value is, for each key, an ArrayList of the relation ids of the relations where the key MBean is associated to given one (as they can be associated in several different relations).
    Throws:
    IllegalArgumentException - if null parameter
  • findAssociatedMBeans

    public Map<ObjectName,List<String>> findAssociatedMBeans​(ObjectName mbeanName,
                                                             String relationTypeName,
                                                             String roleName)
                                                      throws IllegalArgumentException
    
    Retrieves the MBeans associated to given one in a relation.

    This corresponds to CIM Associators and AssociatorNames operations.

    Specified by:
    findAssociatedMBeans in interface RelationServiceMBean
    Parameters:
    mbeanName - ObjectName of MBean
    relationTypeName - 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.
    Returns:
    an HashMap, where the keys are the ObjectNames of the MBeans associated to given MBean, and the value is, for each key, an ArrayList of the relation ids of the relations where the key MBean is associated to given one (as they can be associated in several different relations).
    Throws:
    IllegalArgumentException - if null parameter

method:findRelationsOfType(java.lang.String) [CHANGED]

method:getRole(java.lang.String, java.lang.String) [CHANGED]

method:getRoles(java.lang.String, java.lang.String[]) [CHANGED]

method:getAllRoles(java.lang.String) [CHANGED]

method:getRoleCardinality(java.lang.String, java.lang.String) [CHANGED]

method:setRole(java.lang.String, javax.management.relation.Role) [CHANGED]

method:setRoles(java.lang.String, javax.management.relation.RoleList) [CHANGED]

method:getReferencedMBeans(java.lang.String) [CHANGED]

method:getRelationTypeName(java.lang.String) [CHANGED]

method:handleNotification(javax.management.Notification, java.lang.Object) [CHANGED]

  • handleNotification

    public void handleNotificationpublic void handleNotification​(Notification notif,
                                   Object handback)
    Invoked when a JMX notification occurs. Currently handles notifications for unregistration of MBeans, either referenced in a relation role or being a relation itself.
    Specified by:
    handleNotification in interface NotificationListener
    Parameters:
    notif - The notification.
    handback - An opaque object which helps the listener to associate information regarding the MBean emitter (can be null).
  • handleNotification

    public void handleNotification(Notification notif,
                                   Object handback)
    Invoked when a JMX notification occurs. Currently handles notifications for unregistration of MBeans, either referenced in a relation role or being a relation itself.
    Specified by:
    handleNotification in interface NotificationListener
    Parameters:
    notif - The notification.
    handback - An opaque object which helps the listener to associate information regarding the MBean emitter (can be null).
  • handleNotification

    public void handleNotification​(Notification notif,
                                   Object handback)
    Invoked when a JMX notification occurs. Currently handles notifications for unregistration of MBeans, either referenced in a relation role or being a relation itself.
    Specified by:
    handleNotification in interface NotificationListener
    Parameters:
    notif - The notification.
    handback - An opaque object which helps the listener to associate information regarding the MBean emitter (can be null).

method:getNotificationInfo() [CHANGED]

© 2017 Oracle Corporation and/or its affiliates