Java Doc for Relation.java in  » JMX » XMOJO » 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 » XMOJO » 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 theRoleName)
     Retrieves role value for given role name.
public  IntegergetRoleCardinality(String theRoleName)
     Returns the number of MBeans currently referenced in the given role.
public  RoleResultgetRoles(String[] theRoleNameArray)
     Retrieves values of roles with given names.
public  voidhandleMBeanUnregistration(ObjectName theObjName, String theRoleName)
     Callback used by the Relation Service when a MBean referenced in a role is unregistered.
public  RoleListretrieveAllRoles()
    
public  voidsetRole(Role theRole)
     Sets the given role.
public  RoleResultsetRoles(RoleList theRoleList)
     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 not readable).
throws:
  RelationServiceNotRegisteredException - - if the Relation Serviceis 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) This will return the identifier



getRelationServiceName
public ObjectName getRelationServiceName()(Code)
Returns ObjectName of the Relation Service handling the relation This returns the object name of the relation service



getRelationTypeName
public String getRelationTypeName()(Code)
Returns name of associated relation type. Name of associated relation type.



getRole
public List getRole(String theRoleName) 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:
  theRoleName - - name of role the ArrayList of ObjectName objects being the role value
throws:
  java.lang.IllegalArgumentException - - if null role name
throws:
  RoleNotFoundException - - if:- there is no role with given name- the role is not readable.
throws:
  RelationServiceNotRegisteredException - - if the Relation Serviceis not registered in the MBean Server



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



getRoles
public RoleResult getRoles(String[] theRoleNameArray) 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:
  theRoleNameArray - - array of names of roles to be retrieved a RoleResult object, including a RoleList (for rolessucccessfully retrieved) and a RoleUnresolvedList(for roles not retrieved).
throws:
  java.lang.IllegalArgumentException - - if null role name
throws:
  RelationServiceNotRegisteredException - - if the Relation Serviceis not registered in the MBean Server



handleMBeanUnregistration
public void handleMBeanUnregistration(ObjectName theObjName, String theRoleName) 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:
  theObjName - - ObjectName of unregistered MBean
Parameters:
  theRoleName - - name of role where the MBean is referenced
throws:
  java.lang.IllegalArgumentException - - if null parameter
throws:
  RoleNotFoundException - - if role does not exist in the relationor is not writable
throws:
  InvalidRoleValueException - - if role value does not conform tothe associated role info (this will never happen whencalled from the Relation Service)
throws:
  RelationServiceNotRegisteredException - - if the Relation Serviceis not registered in the MBean Server
throws:
  RelationTypeNotFoundException - - if the relation type has notbeen declared in the Relation Service.
throws:
  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 theRole) throws IllegalArgumentException, RoleNotFoundException, 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:
  theRole - - role to be set (name and new value)
throws:
  java.lang.IllegalArgumentException - - if null role
throws:
  RoleNotFoundException - - if the role is not writable (no test onthe write access mode performed when initialising the role)
throws:
  InvalidRoleValueException - - if value provided for role is notvalid, i.e.:- the number of referenced MBeans in given value is lessthan expected minimum degree- the number of referenced MBeans in provided value exceedsexpected maximum degree- one referenced MBean in the value is not an Object of theMBean class expected for that role- a MBean provided for that role does not exist
throws:
  RelationServiceNotRegisteredException - - if the Relation Serviceis not registered in the MBean Server
throws:
  RelationTypeNotFoundException - - if the relation type has notbeen declared in the Relation Service.



setRoles
public RoleResult setRoles(RoleList theRoleList) 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:
  theRoleList - - list of roles to be set a RoleResult object, including a RoleList (for rolessucccessfully set) and a RoleUnresolvedList (for roles not set).
throws:
  java.lang.IllegalArgumentException - - if null role name
throws:
  RelationServiceNotRegisteredException - - if the Relation Serviceis not registered in the MBean Server
throws:
  RelationTypeNotFoundException - - if the relation type has notbeen declared in the Relation Service.
throws:
  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.