|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--javax.management.relation.RelationSupport
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.
| Field Summary | |
(package private) java.lang.Boolean |
isInRelation
|
(package private) MBeanServer |
mbeanServer
|
(package private) ObjectName |
objectName
|
(package private) java.lang.String |
relId
|
(package private) ObjectName |
relServiceName
|
(package private) java.lang.String |
relTypeName
|
(package private) RoleList |
roleList
|
| Constructor Summary | |
RelationSupport(java.lang.String theRelId,
ObjectName theRelServiceName,
MBeanServer theRelServiceMBeanServer,
java.lang.String theRelTypeName,
RoleList theRoleList)
Creates object. |
|
RelationSupport(java.lang.String theRelId,
ObjectName theRelServiceName,
java.lang.String theRelTypeName,
RoleList theRoleList)
Creates object. |
|
| Method Summary | |
RoleResult |
getAllRoles()
Returns all roles present in the relation |
(package private) RoleResult |
getAllRolesFriend(RelationService service)
This method is a friend method to getAllRoles. |
java.util.Map |
getReferencedMBeans()
Retrieves MBeans referenced in the various roles of the relation. |
java.lang.String |
getRelationId()
Returns relation identifier (used to uniquely identify the relation inside the Relation Service) |
ObjectName |
getRelationServiceName()
Returns ObjectName of the Relation Service handling the relation |
java.lang.String |
getRelationTypeName()
Returns name of associated relation type. |
java.util.List |
getRole(java.lang.String theRoleName)
Retrieves role value for given role name. |
java.lang.Integer |
getRoleCardinality(java.lang.String theRoleName)
Returns the number of MBeans currently referenced in the given role |
(package private) java.lang.Object |
getRoleFriend(java.lang.String theRoleName,
boolean theMultiRoleFlg,
RelationService service)
This method gets the Role/RoleUnresolved object provided a RoleName. |
RoleResult |
getRoles(java.lang.String[] theRoleNameArray)
Retrieves values of roles with given names. |
(package private) RoleResult |
getRolesFriend(java.lang.String[] theRoleNameArray,
RelationService service)
This method returns an RoleResult provided a string[] of roleNames. |
void |
handleMBeanUnregistration(ObjectName theObjName,
java.lang.String theRoleName)
Callback used by the Relation Service when a MBean referenced in a role is unregistered. |
(package private) void |
handleMBeanUnregistrationFriend(ObjectName theObjName,
java.lang.String theRoleName,
RelationService service)
|
java.lang.Boolean |
isInRelationService()
Returns an internal flag specifying if the object is still handled by the Relation Service. |
void |
postDeregister()
Description copied from interface: MBeanRegistration Allows the MBean to perform any operations needed after having been de-registered in the MBean server. |
void |
postRegister(java.lang.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. |
void |
preDeregister()
Description copied from interface: MBeanRegistration Allows the MBean to perform any operations it needs before being de-registered by the MBean server. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Description copied from interface: MBeanRegistration Allows the MBean to perform any operations it needs before being registered in the MBean server. |
RoleList |
retrieveAllRoles()
Returns all roles in the relation without checking read mode |
void |
setRelationServiceManagementFlag(java.lang.Boolean theFlg)
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. |
void |
setRole(Role theRole)
Sets the given role. |
(package private) java.lang.Object |
setRoleFriend(Role theRole,
boolean theMultiRoleFlg,
RelationService service)
This method sets the value of a Role. |
RoleResult |
setRoles(RoleList theRoleList)
Sets the given roles. |
(package private) RoleResult |
setRolesFriend(RoleList theRoleList,
boolean theRelServCallFlg,
RelationService theRelServ)
This method is a localfriend to setRoles. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
java.lang.String relId
java.lang.String relTypeName
RoleList roleList
ObjectName objectName
ObjectName relServiceName
MBeanServer mbeanServer
java.lang.Boolean isInRelation
| Constructor Detail |
public RelationSupport(java.lang.String theRelId,
ObjectName theRelServiceName,
MBeanServer theRelServiceMBeanServer,
java.lang.String theRelTypeName,
RoleList theRoleList)
throws InvalidRoleValueException,
java.lang.IllegalArgumentException
theRelId - - relation identifier, to identify the relation in the Relation Service.
Expected to be unique in the given Relation Service.theRelServiceName - - ObjectName of the Relation Service where the relation will be
registered.
It is required as this is the Relation Service that is aware of the definition of the relation
type of given relation, so that will be able to check update operations (set).theRelServiceMBeanServer - - 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.theRelTypeName - - Name of relation type.
Expected to have been created in given Relation Service.theRoleList - - list of roles (Role objects) to initialised the relation. Can be null.
Expected to conform to relation info in associated relation type.
public RelationSupport(java.lang.String theRelId,
ObjectName theRelServiceName,
java.lang.String theRelTypeName,
RoleList theRoleList)
throws InvalidRoleValueException,
java.lang.IllegalArgumentException
theRelId - - relation identifier, to identify the relation in the Relation Service.
Expected to be unique in the given Relation Service.theRelServiceName - - ObjectName of the Relation Service where the relation will be
registered.
It is required as this is the Relation Service that is aware of the definition of the relation
type of given relation, so that will be able to check update operations (set).theRelTypeName - - Name of relation type.
Expected to have been created in given Relation Service.theRoleList - - list of roles (Role objects) to initialised the relation. Can be null.
Expected to conform to relation info in associated relation type.| Method Detail |
public RoleResult getAllRoles()
throws RelationServiceNotRegisteredException
public java.util.Map getReferencedMBeans()
public java.lang.String getRelationId()
public ObjectName getRelationServiceName()
public java.lang.String getRelationTypeName()
public java.util.List getRole(java.lang.String theRoleName)
throws java.lang.IllegalArgumentException,
RoleNotFoundException,
RelationServiceNotRegisteredException
theRoleName - - name of role
public java.lang.Integer getRoleCardinality(java.lang.String theRoleName)
throws java.lang.IllegalArgumentException,
RoleNotFoundException
theRoleName - - name of role
public RoleResult getRoles(java.lang.String[] theRoleNameArray)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException
theRoleNameArray - - array of names of roles to be retrieved
public void handleMBeanUnregistration(ObjectName theObjName,
java.lang.String theRoleName)
throws java.lang.IllegalArgumentException,
RoleNotFoundException,
InvalidRoleValueException,
RelationServiceNotRegisteredException,
RelationTypeNotFoundException,
RelationNotFoundException
theObjName - - ObjectName of unregistered MBeantheRoleName - - name of role where the MBean is referenced
void handleMBeanUnregistrationFriend(ObjectName theObjName,
java.lang.String theRoleName,
RelationService service)
throws java.lang.IllegalArgumentException,
RoleNotFoundException,
InvalidRoleValueException,
RelationServiceNotRegisteredException,
RelationTypeNotFoundException,
RelationNotFoundException
public java.lang.Boolean isInRelationService()
public void postDeregister()
public void postRegister(java.lang.Boolean registrationDone)
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
public void preDeregister()
throws java.lang.Exception
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws java.lang.Exception
server - - The MBean server in which the MBean will be registered.name - - The object name of the MBean.public RoleList retrieveAllRoles()
public void setRelationServiceManagementFlag(java.lang.Boolean theFlg)
throws java.lang.IllegalArgumentException
theFlg - If true the flag is handled by the relation service false otherwise
public void setRole(Role theRole)
throws java.lang.IllegalArgumentException,
InvalidRoleValueException,
RelationNotFoundException,
RelationServiceNotRegisteredException,
RelationTypeNotFoundException,
RoleNotFoundException
theRole - - role to be set (name and new value)
public RoleResult setRoles(RoleList theRoleList)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationTypeNotFoundException,
RelationNotFoundException
theRoleList - - list of roles to be set
RoleResult getAllRolesFriend(RelationService service)
throws RelationServiceNotRegisteredException
RoleResult getRolesFriend(java.lang.String[] theRoleNameArray,
RelationService service)
throws RelationServiceNotRegisteredException
java.lang.Object getRoleFriend(java.lang.String theRoleName,
boolean theMultiRoleFlg,
RelationService service)
throws java.lang.IllegalArgumentException,
RoleNotFoundException,
RelationServiceNotRegisteredException
RoleResult setRolesFriend(RoleList theRoleList,
boolean theRelServCallFlg,
RelationService theRelServ)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException,
RelationNotFoundException
java.lang.Object setRoleFriend(Role theRole,
boolean theMultiRoleFlg,
RelationService service)
throws java.lang.IllegalArgumentException,
RoleNotFoundException,
InvalidRoleValueException,
RelationTypeNotFoundException,
RelationNotFoundException,
RelationServiceNotRegisteredException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||