Java Doc for RelationServiceMBean.java in  » EJB-Server-JBoss-4.2.1 » jmx » javax » management » relation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » jmx » javax.management.relation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.management.relation.RelationServiceMBean

All known Subclasses:   javax.management.relation.RelationService,
RelationServiceMBean
public interface RelationServiceMBean (Code)
This interface defines the management interface for a relation service.

The relation service performs the following functions:
Creating and deleting relation types and relations.
Making sure relations are consistent as defined by information in their relation types/roles.
Allowing relations to be queried.

Revisions:

20020312 Adrian Brock:

  • Fixed wrong exception types thrown
  • Add missing method getRoles(String, String[])

author:
   Adrian Brock.
version:
   $Revision: 57200 $




Method Summary
public  voidaddRelation(ObjectName relation)
     Add a manually created relation to the relation service.
public  voidaddRelationType(RelationType relationType)
     Add a relation type to the relation service.
public  IntegercheckRoleReading(String roleName, String relationTypeName)
     Checks whether the passed role can be read in the given relation type.

The return value is either zero when readable or a value from RoleStatus .
Parameters:
  roleName - the name of the role to check.
Parameters:
  relationTypeName - the relation type to check.

public  IntegercheckRoleWriting(Role role, String relationTypeName, Boolean initFlag)
     Checks whether the passed role can be written in the given relation type.

The return value is either zero when writable or a value from RoleStatus .
Parameters:
  role - the role to check.
Parameters:
  relationTypeName - the relation type to check.
Parameters:
  initFlag - write access is not check when this flag is true.

public  voidcreateRelation(String relationId, String relationTypeName, RoleList roleList)
     Create a simple relation using RelationSupport for a relation type within the relation service.

Roles not initialised are set to an empty ArrayList.

A RELATION_BASIC_CREATION notification is sent.

public  voidcreateRelationType(String relationTypeName, RoleInfo[] roleInfos)
     Create a relation type within the relation service.
public  MapfindAssociatedMBeans(ObjectName mbeanName, String relationTypeName, String roleName)
     Retrieves MBeans associated with the passed MBean in the passed relation type and role.
Parameters:
  mbeanName - the name of the reference MBean
Parameters:
  relationTypeName - the relation type, null means check allrelation types.
Parameters:
  roleName - the role, null means check all roles.
public  MapfindReferencingRelations(ObjectName mbeanName, String relationTypeName, String roleName)
     Retrieves MBeans referencing the passed MBean in the passed relation type and role.
Parameters:
  mbeanName - the name of the referenced MBean
Parameters:
  relationTypeName - the relation type, null means check allrelation types.
Parameters:
  roleName - the role, null means check all roles.
public  ListfindRelationsOfType(String relationTypeName)
     Retrieves the relation ids for relations of the passed type.
Parameters:
  relationTypeName - the relation type.
public  ListgetAllRelationIds()
     Retrieves all the relation ids.
public  ListgetAllRelationTypeNames()
     Retrieves all the relation type names.
public  RoleResultgetAllRoles(String relationId)
     Retrieves all the roles for a given relation id.
public  booleangetPurgeFlag()
     Retrieves the purge flag.
public  MapgetReferencedMBeans(String relationId)
     Retrieves all the MBeans referenced in all the roles of a relation.
public  StringgetRelationTypeName(String relationId)
     Retrieves the relation type name for the passed relation.
public  ListgetRole(String relationId, String roleName)
     Retrieves MBeans in a role for a given relation id.
public  IntegergetRoleCardinality(String relationId, String roleName)
     Retrieves the number of MBeans in a role for a given relation id.
public  RoleInfogetRoleInfo(String relationTypeName, String roleInfoName)
     Retrieves the role information for a given relation type.
public  ListgetRoleInfos(String relationTypeName)
     Retrieves all the role information for a given relation type.
public  RoleResultgetRoles(String relationId, String[] roleNames)
     Retrieves selected roles for a relation.
public  BooleanhasRelation(String relationId)
     Checks whether the relation service has the passed relation id.
public  voidisActive()
     Checks whether the relation service is active, i.e.
public  StringisRelation(ObjectName objectName)
     Checks whether the passed object name is a relation in this relation service.
public  ObjectNameisRelationMBean(String relationId)
     Checks whether the passed relation id is an MBean created by a user or has been internally created by the relation service.
public  voidpurgeRelations()
     Purge relations.
public  voidremoveRelation(String relationId)
     Removes a relation from the relation service.

For internally created relations, a RELATION_BASIC_REMOVAL notification is sent.

For externally created relations, a RELATION_MBEAN_REMOVAL notification is sent.

The MBeans referenced in the relation are unaffected.

public  voidremoveRelationType(String relationTypeName)
     Removes a relation type from the relation service.

Any relations using this relation type are also removed.

public  voidsendRelationCreationNotification(String relationId)
    
public  voidsendRelationRemovalNotification(String relationId, List unregMBeans)
    
public  voidsendRoleUpdateNotification(String relationId, Role newRole, List oldRoleValue)
     Sends a relation update notification

For internally created relations, a RELATION_BASIC_UPDATE notification is sent.

For externally created relations, a RELATION_MBEAN_UPDATE notification is sent.

The source is this relation service.

This method is called from the RelationSupport setRole() and setRoles() methods.

public  voidsetPurgeFlag(boolean value)
     Sets the purge flag.
public  voidsetRole(String relationId, Role role)
     Sets the role in the passed relation.

The role will be validated according to information in the relation type.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.

public  RoleResultsetRoles(String relationId, RoleList roles)
     Sets the roles in the passed relation.

The roles will be validated according to information in the relation type.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.

public  voidupdateRoleMap(String relationId, Role newRole, List oldRoleValue)
     Handles the update of the relation service role map when a role is changed.

It is called from RelationSupport setRole() and setRoles() and the relation service's setRole() and setRoles() methods.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.




Method Detail
addRelation
public void addRelation(ObjectName relation) throws IllegalArgumentException, RelationServiceNotRegisteredException, NoSuchMethodException, InvalidRelationIdException, InstanceNotFoundException, InvalidRelationServiceException, RelationTypeNotFoundException, RoleNotFoundException, InvalidRoleValueException(Code)
Add a manually created relation to the relation service. It must be registered with the same MBeanService as the relation service.

A RELATION_MBEAN_CREATION notification is sent.
Parameters:
  relation - the object name of the relation
throws:
  IllegalArgumentException - for a null object name.
throws:
  NoSuchMethodException - if the mbean does not implement theRelation interface.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with the MBeanServer.
throws:
  InstanceNotFoundException - when the relation is notregistered in the MBeanServer.
throws:
  InvalidRelationIdException - if the relation idis already used by another relation.
throws:
  InvalidRelationServiceException - if the relation service inthe relation is null or is not the relation service to whichit is being added.
throws:
  RelationTypeNotFoundException - if there is no relation type inthe relation or the relation type has not been registeredwith the relation service.
throws:
  InvalidRoleValueException - if the number of MBeans in arole is outside the bounds of the RoleInfo defined in therelation type, one of the MBeans is not of the correctclass or an MBean does not exist.
throws:
  RoleNotFoundException - if a role in the relation is notin the relation type.




addRelationType
public void addRelationType(RelationType relationType) throws IllegalArgumentException, InvalidRelationTypeException(Code)
Add a relation type to the relation service.
Parameters:
  relationType - the relation type.
throws:
  IllegalArgumentException - for a null relation type.
throws:
  InvalidRelationTypeException - if a relation type alreadyexists in the relation service with the given name.



checkRoleReading
public Integer checkRoleReading(String roleName, String relationTypeName) throws IllegalArgumentException, RelationTypeNotFoundException(Code)
Checks whether the passed role can be read in the given relation type.

The return value is either zero when readable or a value from RoleStatus .
Parameters:
  roleName - the name of the role to check.
Parameters:
  relationTypeName - the relation type to check. the result described above.
throws:
  IllegalArgumentException - for a null parameters.
throws:
  RelationTypeNotFoundException - if the relation type doesexist in the relation service.




checkRoleWriting
public Integer checkRoleWriting(Role role, String relationTypeName, Boolean initFlag) throws IllegalArgumentException, RelationTypeNotFoundException(Code)
Checks whether the passed role can be written in the given relation type.

The return value is either zero when writable or a value from RoleStatus .
Parameters:
  role - the role to check.
Parameters:
  relationTypeName - the relation type to check.
Parameters:
  initFlag - write access is not check when this flag is true. the result described above.
throws:
  IllegalArgumentException - for a null parameters.
throws:
  RelationTypeNotFoundException - if the relation type doesexist in the relation service.




createRelation
public void createRelation(String relationId, String relationTypeName, RoleList roleList) throws RelationServiceNotRegisteredException, IllegalArgumentException, RoleNotFoundException, InvalidRelationIdException, RelationTypeNotFoundException, InvalidRoleValueException(Code)
Create a simple relation using RelationSupport for a relation type within the relation service.

Roles not initialised are set to an empty ArrayList.

A RELATION_BASIC_CREATION notification is sent.
Parameters:
  relationId - the relation id of the relation
Parameters:
  relationTypeName - the relation type of the relation
Parameters:
  roleList - the roles to initialise in the relation (can be null)
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with the MBeanServer.
throws:
  InvalidRelationIdException - if the relation idis already used by another relation.
throws:
  RelationTypeNotFoundException - if there is no relation type inthe relation or the relation type has not been registeredwith the relation service.
throws:
  InvalidRoleValueException - if the number of MBeans in arole is outside the bounds of the RoleInfo defined in therelation type, one of the MBeans is not of the correctclass, an MBean does not exist, the same role name isused in two different relations.
throws:
  RoleNotFoundException - if a role in the relation is notin the relation type.




createRelationType
public void createRelationType(String relationTypeName, RoleInfo[] roleInfos) throws IllegalArgumentException, InvalidRelationTypeException(Code)
Create a relation type within the relation service.
Parameters:
  relationTypeName - the relation type name.
Parameters:
  roleInfos - an array of role infos.
throws:
  IllegalArgumentException - for a null relation type.
throws:
  InvalidRelationTypeException - if a relation type alreadyexists in the relation service with the given name, thereare problems with the role infos.



findAssociatedMBeans
public Map findAssociatedMBeans(ObjectName mbeanName, String relationTypeName, String roleName) throws IllegalArgumentException(Code)
Retrieves MBeans associated with the passed MBean in the passed relation type and role.
Parameters:
  mbeanName - the name of the reference MBean
Parameters:
  relationTypeName - the relation type, null means check allrelation types.
Parameters:
  roleName - the role, null means check all roles. a HashMap with keys of the related MBeans with thevalue for each MBean an ArrayList of Relation Types.
throws:
  IllegalArgumentException - for a null object name.



findReferencingRelations
public Map findReferencingRelations(ObjectName mbeanName, String relationTypeName, String roleName) throws IllegalArgumentException(Code)
Retrieves MBeans referencing the passed MBean in the passed relation type and role.
Parameters:
  mbeanName - the name of the referenced MBean
Parameters:
  relationTypeName - the relation type, null means check allrelation types.
Parameters:
  roleName - the role, null means check all roles. a HashMap with keys of the referencing MBeans with thevalue for each MBean an ArrayList of Relation Types.
throws:
  IllegalArgumentException - for a null object name.



findRelationsOfType
public List findRelationsOfType(String relationTypeName) throws IllegalArgumentException, RelationTypeNotFoundException(Code)
Retrieves the relation ids for relations of the passed type.
Parameters:
  relationTypeName - the relation type. an ArrayList of relation ids.
throws:
  IllegalArgumentException - for a null relation type name.
throws:
  RelationTypeNotFoundException - if there is no relation typewith the passed name.



getAllRelationIds
public List getAllRelationIds()(Code)
Retrieves all the relation ids. an ArrayList of relation ids.



getAllRelationTypeNames
public List getAllRelationTypeNames()(Code)
Retrieves all the relation type names. an ArrayList of relation type names



getAllRoles
public RoleResult getAllRoles(String relationId) throws IllegalArgumentException, RelationNotFoundException, RelationServiceNotRegisteredException(Code)
Retrieves all the roles for a given relation id.
Parameters:
  relationId - the relation id a RoleResult with a RoleList for readable roles and aRoleUnresolvedList for roles that are not readable.
throws:
  IllegalArgumentException - for a null relation id.
throws:
  RelationNotFoundException - when the relation id does notexist.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with an MBeanServer.



getPurgeFlag
public boolean getPurgeFlag()(Code)
Retrieves the purge flag. This flag controls whether all relations have to validated when notification is received of an MBeans unregistration or whether the purgeRelations() method has to be called. true for an immediate purge on unregistration, false otherwise.



getReferencedMBeans
public Map getReferencedMBeans(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)
Retrieves all the MBeans referenced in all the roles of a relation.
Parameters:
  relationId - the relation id a HashMap with a key of the MBeans and the values anarray list of the role names for each MBean.
throws:
  IllegalArgumentException - for a null relation id.
throws:
  RelationNotFoundException - when the relation id does notexist.



getRelationTypeName
public String getRelationTypeName(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)
Retrieves the relation type name for the passed relation.
Parameters:
  relationId - the relation id the relation type name.
throws:
  IllegalArgumentException - for a null relation id.
throws:
  RelationNotFoundException - when the relation id does notexist.



getRole
public List getRole(String relationId, String roleName) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException, RoleNotFoundException(Code)
Retrieves MBeans in a role for a given relation id.
Parameters:
  relationId - the relation id
Parameters:
  roleName - the role name an ArrayList of object names for mbeans in the role.
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with an MBeanServer.
throws:
  RoleNotFoundException - when the role does not exist oris not readable.



getRoleCardinality
public Integer getRoleCardinality(String relationId, String roleName) throws IllegalArgumentException, RelationNotFoundException, RoleNotFoundException(Code)
Retrieves the number of MBeans in a role for a given relation id.
Parameters:
  relationId - the relation id
Parameters:
  roleName - the role name the number of mbeans in the role
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.
throws:
  RoleNotFoundException - when the role does not exist oris not readable.



getRoleInfo
public RoleInfo getRoleInfo(String relationTypeName, String roleInfoName) throws IllegalArgumentException, RelationTypeNotFoundException, RoleInfoNotFoundException(Code)
Retrieves the role information for a given relation type.
Parameters:
  relationTypeName - the relation type name
Parameters:
  roleInfoName - the role information name the role information.
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationTypeNotFoundException - when the relation type does notexist.
throws:
  RoleInfoNotFoundException - when the role information does notexist for the relation type.



getRoleInfos
public List getRoleInfos(String relationTypeName) throws IllegalArgumentException, RelationTypeNotFoundException(Code)
Retrieves all the role information for a given relation type.
Parameters:
  relationTypeName - the relation type name an ArrayList of role information.
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationTypeNotFoundException - when the relation id does notexist.



getRoles
public RoleResult getRoles(String relationId, String[] roleNames) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException(Code)
Retrieves selected roles for a relation.
Parameters:
  relationId - the relation id
Parameters:
  roleNames - an array of role name a RoleResult containing resolved and unresolved roles.
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with an MBeanServer.



hasRelation
public Boolean hasRelation(String relationId) throws IllegalArgumentException(Code)
Checks whether the relation service has the passed relation id.
Parameters:
  relationId - the relation id true when it has the relationId, false otherwise.
throws:
  IllegalArgumentException - for a null parameter.



isActive
public void isActive() throws RelationServiceNotRegisteredException(Code)
Checks whether the relation service is active, i.e. it is registered with an MBeanServer.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with an MBeanServer.



isRelation
public String isRelation(ObjectName objectName) throws IllegalArgumentException(Code)
Checks whether the passed object name is a relation in this relation service.
Parameters:
  objectName - the name of the MBean to check the relation id the MBean is registered as, or nullwhen not registered.
throws:
  IllegalArgumentException - for a null object name.



isRelationMBean
public ObjectName isRelationMBean(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)
Checks whether the passed relation id is an MBean created by a user or has been internally created by the relation service.
Parameters:
  relationId - the relation id to check the object name of the MBean when it is externally created,null otherwise.
throws:
  IllegalArgumentException - for a null object name.
throws:
  RelationNotFoundException - when the relation id does notexist.



purgeRelations
public void purgeRelations() throws RelationServiceNotRegisteredException(Code)
Purge relations. This method is called automatically when the purge flag is true and an MBean in a relation is unregistered.

Not purging relations automatically can lead to problems when the same object name is reused.

If the unregistration causes a role to go below its minimal cardinality, the relation is removed. Otherwise the relation's handleMBeanUnregistration() is called.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with an MBeanServer.




removeRelation
public void removeRelation(String relationId) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException(Code)
Removes a relation from the relation service.

For internally created relations, a RELATION_BASIC_REMOVAL notification is sent.

For externally created relations, a RELATION_MBEAN_REMOVAL notification is sent.

The MBeans referenced in the relation are unaffected.
Parameters:
  relationId - the relation id
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with an MBeanServer.




removeRelationType
public void removeRelationType(String relationTypeName) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationTypeNotFoundException(Code)
Removes a relation type from the relation service.

Any relations using this relation type are also removed.
Parameters:
  relationTypeName - the relation type name
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationTypeNotFoundException - when the relation type does notexist.
throws:
  RelationServiceNotRegisteredException - when the relationservice is not registered with an MBeanServer.




sendRelationCreationNotification
public void sendRelationCreationNotification(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)
Sends a relation creation notification

For internally created relations, a RELATION_BASIC_CREATION notification is sent.

For externally created relations, a RELATION_MBEAN_CREATION notification is sent.

The source is this relation service.

This method is called by addRelation() and createRelation()
Parameters:
  relationId - the relation id
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.




sendRelationRemovalNotification
public void sendRelationRemovalNotification(String relationId, List unregMBeans) throws IllegalArgumentException, RelationNotFoundException(Code)
Sends a relation removal notification

For internally created relations, a RELATION_BASIC_REMOVAL notification is sent.

For externally created relations, a RELATION_MBEAN_REMOVAL notification is sent.

The source is this relation service.

This method is called by removeRelation()
Parameters:
  relationId - the relation id
Parameters:
  unregMBeans - a list of MBeans to be unregistered due to thisremoval (can be null)
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.




sendRoleUpdateNotification
public void sendRoleUpdateNotification(String relationId, Role newRole, List oldRoleValue) throws IllegalArgumentException, RelationNotFoundException(Code)
Sends a relation update notification

For internally created relations, a RELATION_BASIC_UPDATE notification is sent.

For externally created relations, a RELATION_MBEAN_UPDATE notification is sent.

The source is this relation service.

This method is called from the RelationSupport setRole() and setRoles() methods.
Parameters:
  relationId - the relation id
Parameters:
  newRole - the new role
Parameters:
  oldRoleValue - a list of MBeans in the old role
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.




setPurgeFlag
public void setPurgeFlag(boolean value)(Code)
Sets the purge flag. This flag controls whether all relations have to validated when notification is received of an MBeans unregistration or whether the purgeRelations() method has to be called.
Parameters:
  value - true for an immediate purge on unregistration, falseotherwise.



setRole
public void setRole(String relationId, Role role) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException, RoleNotFoundException, InvalidRoleValueException, RelationTypeNotFoundException(Code)
Sets the role in the passed relation.

The role will be validated according to information in the relation type.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.
Parameters:
  relationId - the relation to change the role for.
Parameters:
  role - the new role
throws:
  IllegalArgumentException - for null parameters
throws:
  RelationServiceNotRegisteredException - when the relation servicehas not been registered with an MBeanServer
throws:
  RelationNotFoundException - when the relation does not exist inthe relation service.
throws:
  RoleNotFoundException - when this is an internal relation orthe role does not exist or it is not writable.
throws:
  InvalidRoleValueException - when the role is not valid accordingto information in the relation type.
throws:
  RelationTypeNotFoundException - if the relation type is not known.




setRoles
public RoleResult setRoles(String relationId, RoleList roles) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException(Code)
Sets the roles in the passed relation.

The roles will be validated according to information in the relation type.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.
Parameters:
  relationId - the relation to change the role for.
Parameters:
  roles - the list of roles
throws:
  IllegalArgumentException - for null parameters
throws:
  RelationServiceNotRegisteredException - when the relation servicehas not been registered with an MBeanServer
throws:
  RelationNotFoundException - when the relation does not exist inthe relation service.




updateRoleMap
public void updateRoleMap(String relationId, Role newRole, List oldRoleValue) throws IllegalArgumentException, RelationServiceNotRegisteredException, RelationNotFoundException(Code)
Handles the update of the relation service role map when a role is changed.

It is called from RelationSupport setRole() and setRoles() and the relation service's setRole() and setRoles() methods.

The relation service will keep track the MBeans unregistration to maintain the consistency of the relation.
Parameters:
  relationId - the relation id
Parameters:
  newRole - the new role
Parameters:
  oldRoleValue - a list of MBeans in the old role
throws:
  IllegalArgumentException - for a null parameter.
throws:
  RelationNotFoundException - when the relation id does notexist.
throws:
  RelationServiceNotRegisteredException - when the relationservice has not been registered with an MBeanServer




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.