Creates a
RelationSupport
object.
This constructor has to be used when the user relation MBean
implements the interfaces expected to be supported by a relation by
delegating to a RelationSupport object.
This object needs to know the Relation Service expected to handle the
relation. So it has to know the MBean Server where the Relation Service
is registered.
According to a limitation, a relation MBean must be registered in the
same MBean Server as the Relation Service expected to handle it. So the
user relation MBean has to be created and registered, and then the
wrapped RelationSupport object can be created within the identified MBean
Server.
Nothing is done at the Relation Service level, i.e.
the RelationSupport
object is not added to the
RelationService
and no checks are performed to
see if the provided values are correct.
The object is always created, EXCEPT if:
- any of the required parameters is null
.
- the same name is used for two roles.
To be handled as a relation, the RelationSupport
object has
to be added to the Relation Service using the Relation Service method
addRelation().
Parameters:
- relationId - relation identifier, to identify the relation in the
Relation Service.
Expected to be unique in the given Relation Service.
- relationServiceName - ObjectName of the Relation Service where
the relation will be registered.
This parameter is required as it is the Relation Service that is
aware of the definition of the relation type of the given relation,
so that will be able to check update operations (set).
- relationServiceMBeanServer - MBean Server where the wrapping MBean
is or will be registered.
Expected to be the MBean Server where the Relation Service is or will
be registered.
- relationTypeName - Name of relation type.
Expected to have been created in the given Relation Service.
- list - list of roles (Role objects) to initialize the
relation. Can be {@code null}.
Expected to conform to relation info in associated relation type.
Throws:
- InvalidRoleValueException - if the same name is used for two
roles.
- IllegalArgumentException - if any of the required parameters
(relation id, relation service ObjectName, relation service MBeanServer,
or relation type name) is {@code null}.