| java.lang.Object javax.management.relation.RelationSupport
All known Subclasses: example.jmx.relation.SimpleRelation,
RelationSupport | public class RelationSupport implements RelationSupportMBean,MBeanRegistration(Code) | | A RelationSupport object is used internally by the Relation Service to
represent simple relations (only roles, no properties or methods), with an
unlimited number of roles, of any relation type. As internal representation,
it is not exposed to the user.
RelationSupport class conforms to the design patterns of standard MBean. So
the user can decide to instantiate a RelationSupport object himself as
a MBean (as it follows the MBean design patterns), to register it in the
MBean Server, and then to add it in the Relation Service.
The user can also, when creating his own MBean relation class, have it
extending RelationSupport, to retrieve the implementations of required
interfaces (see below).
It is also possible to have in a user relation MBean class a member
being a RelationSupport object, and to implement the required interfaces by
delegating all to this member.
RelationSupport implements the Relation interface (to be handled by the
Relation Service).
It implements also the MBeanRegistration interface to be able to retrieve
the MBean Server where it is registered (if registered as a MBean) to access
to its Relation Service.
|
Constructor Summary | |
public | RelationSupport(String relationId, ObjectName relationServiceObjectName, String relationTypeName, RoleList roleList) Creates object.
This constructor has to be used when the RelationSupport object will be
registered as a MBean by the user, or when creating a user relation
MBean those class extends RelationSupport.
Nothing is done at the Relation Service level, i.e. | public | RelationSupport(String relationId, ObjectName relationServiceObjectName, MBeanServer mbeanServer, String relationTypeName, RoleList roleList) |
RelationSupport | public RelationSupport(String relationId, ObjectName relationServiceObjectName, String relationTypeName, RoleList roleList) throws InvalidRoleValueException, IllegalArgumentException(Code) | | Creates object.
This constructor has to be used when the RelationSupport object will be
registered as a MBean by the user, or when creating a user relation
MBean those class extends RelationSupport.
Nothing is done at the Relation Service level, i.e. the RelationSupport
object is not added, and no check if the provided values are correct.
The object is always created, EXCEPT if:
- one mandatory parameter is not provided
- the same name is used for two roles.
To be handled as a relation, the object has then to be added in the
Relation Service using Relation Service method addRelation().
Parameters: relationId - relation identifier, to identify the relation in theRelation Service. Expected to be unique in the given Relation Service. Parameters: relationServiceObjectName - ObjectName of the Relation Service wherethe relation will be registered. It is required as this is the Relation Service that is aware of thedefinition of the relation type of given relation, so that will be ableto check update operations (set). Parameters: relationTypeName - Name of relation type. Expected to have been created in given Relation Service. Parameters: roleList - list of roles (Role objects) to initialised therelation. Can be null. Expected to conform to relation info in associated relation type. exception: InvalidRoleValueException - if the same name is used for tworoles. exception: IllegalArgumentException - if a required value (RelationService Object Name, etc.) is not provided as parameter. |
getReferencedMBeans | public Map getReferencedMBeans()(Code) | | Retrieves MBeans referenced in the various roles of the relation.
tell us how many role's refrences a MBean has
a HashMap mapping: ObjectName -> ArrayList of String (role names) |
getRelationId | public String getRelationId()(Code) | | Returns relation identifier (used to uniquely identify the relation
inside the Relation Service)
|
getRelationServiceName | public ObjectName getRelationServiceName()(Code) | | Returns ObjectName of the Relation Service handling the relation
|
getRelationTypeName | public String getRelationTypeName()(Code) | | Returns name of associated relation type.
|
isInRelationService | public Boolean isInRelationService()(Code) | | Returns an internal flag specifying if the object is still handled by
the Relation Service.
|
postDeregister | public void postDeregister()(Code) | | |
postRegister | public void postRegister(Boolean registrationDone)(Code) | | |
retrieveAllRoles | public RoleList retrieveAllRoles()(Code) | | Returns all roles in the relation without checking read mode
a RoleList |
setRelationServiceManagementFlag | public void setRelationServiceManagementFlag(Boolean flag) throws IllegalArgumentException(Code) | | Sets the flag to specify that it is handled or not by the Relation
Service
BEWARE, this method has to be exposed for the user relation MBeans,
as the Relation Service will access them through their management
interface. It is RECOMMENDED NOT to use this method. Using it does not
affect the registration of the relation object in the Relation Service,
but will provide wrong information about it!!!!
exception: IllegalArgumentException - if null parameter |
|
|