Java Doc for Relation.java in  » JMX » jfoxmx » 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 » JMX » jfoxmx » javax.management.relation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.management.relation.Relation

Relation
public interface Relation (Code)
This interface has to be implemented by any MBean class expected to represent a relation managed using the Relation Service.

Simple relations, i.e. having only roles, no properties or methods, can be created directly by the Relation Service (represented as RelationSupport objects, internally handled by the Relation Service).

If the user wants to represent more complex relations, involving properties and/or methods, he has to provide his own class implementing the Relation interface. This can be achieved either by inheriting from RelationSupport class, or by implementing the interface (fully or delegation to a RelationSupport object member).

Specifying such user relation class is to introduce properties and/or methods. Those have to be exposed for remote management. So this means that any user relation class must be a MBean class.





Method Summary
public  RoleResultgetAllRoles()
    
public  MapgetReferencedMBeans()
     Retrieves MBeans referenced in the various roles of the relation.
public  StringgetRelationId()
    
public  ObjectNamegetRelationServiceName()
    
public  StringgetRelationTypeName()
     Returns name of associated relation type.
public  ListgetRole(String roleName)
     Retrieves role value for given role name.
public  IntegergetRoleCardinality(String roleName)
    
public  RoleResultgetRoles(String[] roleNameArray)
     Retrieves values of roles with given names.
public  voidhandleMBeanUnregistration(ObjectName objectName, String roleName)
     Callback used by the Relation Service when a MBean referenced in a role is unregistered.

The Relation Service will call this method to let the relation take action to reflect the impact of such unregistration.

BEWARE.

public  RoleListretrieveAllRoles()
    
public  voidsetRole(Role role)
     Sets the given role.
public  RoleResultsetRoles(RoleList roleList)
     Sets the given roles.



Method Detail
getAllRoles
public RoleResult getAllRoles() throws RelationServiceNotRegisteredException(Code)
Returns all roles present in the relation a RoleResult object, including a RoleList (for rolessucccessfully retrieved) and a RoleUnresolvedList (for roles notreadable).
exception:
  RelationServiceNotRegisteredException - if the RelationService is not registered in the MBean Server



getReferencedMBeans
public Map getReferencedMBeans()(Code)
Retrieves MBeans referenced in the various roles of the relation. 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.



getRole
public List getRole(String roleName) throws IllegalArgumentException, RoleNotFoundException, RelationServiceNotRegisteredException(Code)
Retrieves role value for given role name.

Checks if the role exists and is readable according to the relation type.
Parameters:
  roleName - name of role the ArrayList of ObjectName objects being the role value
exception:
  IllegalArgumentException - if null role name
exception:
  RoleNotFoundException - if:

- there is no role with given name

- the role is not readable.
exception:
  RelationServiceNotRegisteredException - if the RelationService is not registered in the MBean Server




getRoleCardinality
public Integer getRoleCardinality(String roleName) throws IllegalArgumentException, RoleNotFoundException(Code)
Returns the number of MBeans currently referenced in the given role
Parameters:
  roleName - name of role the number of currently referenced MBeans in that role
exception:
  IllegalArgumentException - if null role name
exception:
  RoleNotFoundException - if there is no role with given name



getRoles
public RoleResult getRoles(String[] roleNameArray) throws IllegalArgumentException, RelationServiceNotRegisteredException(Code)
Retrieves values of roles with given names.

Checks for each role if it exists and is readable according to the relation type.
Parameters:
  roleNameArray - array of names of roles to be retrieved a RoleResult object, including a RoleList (for rolessucccessfully retrieved) and a RoleUnresolvedList (for roles notretrieved).
exception:
  IllegalArgumentException - if null role name
exception:
  RelationServiceNotRegisteredException - if the RelationService is not registered in the MBean Server




handleMBeanUnregistration
public void handleMBeanUnregistration(ObjectName objectName, String roleName) throws IllegalArgumentException, RoleNotFoundException, InvalidRoleValueException, RelationServiceNotRegisteredException, RelationTypeNotFoundException, RelationNotFoundException(Code)
Callback used by the Relation Service when a MBean referenced in a role is unregistered.

The Relation Service will call this method to let the relation take action to reflect the impact of such unregistration.

BEWARE. the user is not expected to call this method.

Current implementation is to set the role with its current value (list of ObjectNames of referenced MBeans) without the unregistered one.
Parameters:
  objectName - ObjectName of unregistered MBean
Parameters:
  roleName - name of role where the MBean is referenced
exception:
  IllegalArgumentException - if null parameter
exception:
  RoleNotFoundException - if role does not exist in therelation or is not writable
exception:
  InvalidRoleValueException - if role value does not conform tothe associated role info (this will never happen when called from theRelation Service)
exception:
  RelationServiceNotRegisteredException - if the RelationService is not registered in the MBean Server
exception:
  RelationTypeNotFoundException - if the relation type has notbeen declared in the Relation Service.
exception:
  RelationNotFoundException - if this method is called for arelation MBean not added in the Relation Service.




retrieveAllRoles
public RoleList retrieveAllRoles()(Code)
Returns all roles in the relation without checking read mode a RoleList



setRole
public void setRole(Role role) throws IllegalArgumentException, RoleNotFoundException, RelationTypeNotFoundException, InvalidRoleValueException, RelationServiceNotRegisteredException, RelationTypeNotFoundException, RelationNotFoundException(Code)
Sets the given role.

Will check the role according to its corresponding role definition provided in relation's relation type

Will send a notification (RelationNotification with type RELATION_BASIC_UPDATE or RELATION_MBEAN_UPDATE, depending if the relation is a MBean or not).
Parameters:
  role - role to be set (name and new value)
exception:
  IllegalArgumentException - if null role
exception:
  RoleNotFoundException - if the role is not writable (notest on the write access mode performed when initialising the role)
exception:
  InvalidRoleValueException - if value provided forrole is not valid, i.e.:

- the number of referenced MBeans in given value is less thanexpected minimum degree

- the number of referenced MBeans in provided value exceeds expectedmaximum degree

- one referenced MBean in the value is not an Object of the MBeanclass expected for that role

- a MBean provided for that role does not exist
exception:
  RelationServiceNotRegisteredException - if the RelationService is not registered in the MBean Server
exception:
  RelationTypeNotFoundException - if the relation type has notbeen declared in the Relation Service.




setRoles
public RoleResult setRoles(RoleList roleList) throws IllegalArgumentException, RelationServiceNotRegisteredException, RelationTypeNotFoundException, RelationNotFoundException(Code)
Sets the given roles.

Will check the role according to its corresponding role definition provided in relation's relation type

Will send one notification (RelationNotification with type RELATION_BASIC_UPDATE or RELATION_MBEAN_UPDATE, depending if the relation is a MBean or not) per updated role.
Parameters:
  roleList - list of roles to be set a RoleResult object, including a RoleList (for rolessucccessfully set) and a RoleUnresolvedList (for roles notset).
exception:
  IllegalArgumentException - if null role name
exception:
  RelationServiceNotRegisteredException - if the RelationService is not registered in the MBean Server
exception:
  RelationTypeNotFoundException - if the relation type has notbeen declared in the Relation Service.
exception:
  RelationNotFoundException - if the relation MBean has not beenadded in the Relation Service.




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