Java Doc for RelationService.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) 


java.lang.Object
   javax.management.NotificationBroadcasterSupport
      javax.management.relation.RelationService

RelationService
public class RelationService extends NotificationBroadcasterSupport implements RelationServiceMBean,MBeanRegistration,NotificationListener(Code)

author:
   Young Yang



Constructor Summary
public  RelationService(boolean purgeFlag)
    

Method Summary
public  voidaddRelation(ObjectName objectName)
    
public  voidaddRelationType(RelationType relationType)
     Adds given object as a relation type.
public  IntegercheckRoleReading(String roleName, String relTypeName)
    
public  IntegercheckRoleWriting(Role role, String relTypeName, Boolean initFlag)
    
public  voidcreateRelation(String relationId, String relTypeName, RoleList roleList)
    
public  voidcreateRelationType(String relTypeName, RoleInfo[] roleInfoArray)
     Creates a relation type (a RelationTypeSupport object) with given role infos (provided by the RoleInfo objects), and adds it in the Relation Service.
public  MapfindAssociatedMBeans(ObjectName objectName, String relTypeName, String roleName)
     Retrieves the MBeans associated to given one in a relation.

This corresponds to CIM Associators and AssociatorNames operations.
Parameters:
  objectName - ObjectName of MBean
Parameters:
  relTypeName - can be null; if specified, only the relationsof that type will be considered in the search.

public  MapfindReferencingRelations(ObjectName objectName, String relTypeName, String roleName)
     Retrieves the relations where a given MBean is referenced.
Parameters:
  objectName - ObjectName of MBean
Parameters:
  relTypeName - can be null; if specified, only the relationsof that type will be considered in the search.
public  ListfindRelationsOfType(String relTypeName)
    
public  ListgetAllRelationIds()
    
public  ListgetAllRelationTypeNames()
    
public  RoleResultgetAllRoles(String relationId)
    
public  MBeanNotificationInfo[]getNotificationInfo()
    
public  booleangetPurgeFlag()
    
public  MapgetReferencedMBeans(String relationId)
     Retrieves MBeans referenced in the various roles of the relation.
public  StringgetRelationTypeName(String relationId)
    
public  ListgetRole(String relationId, String roleName)
    
public  IntegergetRoleCardinality(String relationId, String roleName)
    
public  RoleInfogetRoleInfo(String relTypeName, String roleInfoName)
    
public  ListgetRoleInfos(String relTypeName)
    
public  RoleResultgetRoles(String relationId, String[] roleNames)
    
public  voidhandleNotification(Notification notif, Object handback)
     Invoked when a JMX notification occurs.
public  BooleanhasRelation(String relationId)
    
public  voidisActive()
    
public  StringisRelation(ObjectName objectName)
    
public  ObjectNameisRelationMBean(String relationId)
     If the relation is represented by a MBean (created by the user and added as a relation in the Relation Service), returns the ObjectName of the MBean. ObjectName of the corresponding relation MBean, or null ifthe relation is not a MBean.
public  voidpostDeregister()
    
public  voidpostRegister(Boolean registrationDone)
    
public  voidpreDeregister()
    
public  ObjectNamepreRegister(MBeanServer server, ObjectName name)
    
public  voidpurgeRelations()
    
public  voidremoveRelation(String relationId)
    
public  voidremoveRelationType(String relTypeName)
    
public  voidsendRelationCreationNotification(String relationId)
    
public  voidsendRelationRemovalNotification(String relationId, List unregMBeanList)
    
public  voidsendRoleUpdateNotification(String relationId, Role newRole, List oldRoleValue)
    
public  voidsetPurgeFlag(boolean flag)
     Sets the flag to indicate if when a notification is received for the unregistration of a MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called.
public  voidsetRole(String relationId, Role role)
    
public  RoleResultsetRoles(String relationId, RoleList roleList)
    
public  voidupdateRoleMap(String relationId, Role role, List oldRoleValue)
    


Constructor Detail
RelationService
public RelationService(boolean purgeFlag)(Code)




Method Detail
addRelation
public void addRelation(ObjectName objectName) throws IllegalArgumentException, RelationServiceNotRegisteredException, NoSuchMethodException, InvalidRelationIdException, InstanceNotFoundException, InvalidRelationServiceException, RelationTypeNotFoundException, RoleNotFoundException, InvalidRoleValueException(Code)
add a external Relation with it's DEFAULT_OBJECTNAME



addRelationType
public void addRelationType(RelationType relationType) throws IllegalArgumentException, InvalidRelationTypeException(Code)
Adds given object as a relation type. The object is expected to implement the relationType interface.
Parameters:
  relationType - relation type object (implementing therelationType interface)



checkRoleReading
public Integer checkRoleReading(String roleName, String relTypeName) throws IllegalArgumentException, RelationTypeNotFoundException(Code)



checkRoleWriting
public Integer checkRoleWriting(Role role, String relTypeName, Boolean initFlag) throws IllegalArgumentException, RelationTypeNotFoundException(Code)



createRelation
public void createRelation(String relationId, String relTypeName, RoleList roleList) throws RelationServiceNotRegisteredException, IllegalArgumentException, RoleNotFoundException, InvalidRelationIdException, RelationTypeNotFoundException, InvalidRoleValueException(Code)
doCreate a internal Relation



createRelationType
public void createRelationType(String relTypeName, RoleInfo[] roleInfoArray) throws IllegalArgumentException, InvalidRelationTypeException(Code)
Creates a relation type (a RelationTypeSupport object) with given role infos (provided by the RoleInfo objects), and adds it in the Relation Service.



findAssociatedMBeans
public Map findAssociatedMBeans(ObjectName objectName, String relTypeName, String roleName) throws IllegalArgumentException(Code)
Retrieves the MBeans associated to given one in a relation.

This corresponds to CIM Associators and AssociatorNames operations.
Parameters:
  objectName - ObjectName of MBean
Parameters:
  relTypeName - can be null; if specified, only the relationsof that type will be considered in the search. Else allrelation types are considered.
Parameters:
  roleName - can be null; if specified, only the relationswhere the MBean is referenced in that role will be considered. Else allroles are considered. an HashMap, where the keys are the ObjectNames of the MBeansassociated to given MBean, and the value is, for each key, an ArrayListof the relation ids of the relations where the key MBean isassociated to given one (as they can be associated in several differentrelations).
exception:
  IllegalArgumentException - if null parameter




findReferencingRelations
public Map findReferencingRelations(ObjectName objectName, String relTypeName, String roleName) throws IllegalArgumentException(Code)
Retrieves the relations where a given MBean is referenced.
Parameters:
  objectName - ObjectName of MBean
Parameters:
  relTypeName - can be null; if specified, only the relationsof that type will be considered in the search. Else all relation typesare considered.
Parameters:
  roleName - can be null; if specified, only the relationswhere the MBean is referenced in that role will be returned. Else allroles are considered. an HashMap, where the keys are the relation ids of the relationswhere the MBean is referenced, and the value is, for each key,an ArrayList of role names (as a MBean can be referenced in severalroles in the same relation).



findRelationsOfType
public List findRelationsOfType(String relTypeName) throws IllegalArgumentException, RelationTypeNotFoundException(Code)



getAllRelationIds
public List getAllRelationIds()(Code)



getAllRelationTypeNames
public List getAllRelationTypeNames()(Code)
Retrieves names of all known relation types ArrayList of relation type names (Strings)



getAllRoles
public RoleResult getAllRoles(String relationId) throws IllegalArgumentException, RelationNotFoundException, RelationServiceNotRegisteredException(Code)



getNotificationInfo
public MBeanNotificationInfo[] getNotificationInfo()(Code)



getPurgeFlag
public boolean getPurgeFlag()(Code)



getReferencedMBeans
public Map getReferencedMBeans(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)
Retrieves MBeans referenced in the various roles of the relation.
Parameters:
  relationId - relation id a HashMap mapping:

ObjectName -> ArrayList of String (role names)




getRelationTypeName
public String getRelationTypeName(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)



getRole
public List getRole(String relationId, String roleName) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException, RoleNotFoundException(Code)



getRoleCardinality
public Integer getRoleCardinality(String relationId, String roleName) throws IllegalArgumentException, RelationNotFoundException, RoleNotFoundException(Code)



getRoleInfo
public RoleInfo getRoleInfo(String relTypeName, String roleInfoName) throws IllegalArgumentException, RelationTypeNotFoundException, RoleInfoNotFoundException(Code)



getRoleInfos
public List getRoleInfos(String relTypeName) throws IllegalArgumentException, RelationTypeNotFoundException(Code)
Retrieves list of role infos (RoleInfo objects) of a given relation type



getRoles
public RoleResult getRoles(String relationId, String[] roleNames) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException(Code)



handleNotification
public void handleNotification(Notification notif, Object handback)(Code)
Invoked when a JMX notification occurs. Currently handles notifications for unregistration of MBeans, either referenced in a relation role or being a relation itself.
Parameters:
  notif - The notification.
Parameters:
  handback - An opaque object which helps the listener toassociate information regarding the MBean emitter (can be null).



hasRelation
public Boolean hasRelation(String relationId) throws IllegalArgumentException(Code)



isActive
public void isActive() throws RelationServiceNotRegisteredException(Code)



isRelation
public String isRelation(ObjectName objectName) throws IllegalArgumentException(Code)
return relation id (String) or null (if the ObjectName is not a relation handled by the Relation Service)



isRelationMBean
public ObjectName isRelationMBean(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)
If the relation is represented by a MBean (created by the user and added as a relation in the Relation Service), returns the ObjectName of the MBean. ObjectName of the corresponding relation MBean, or null ifthe relation is not a MBean.



postDeregister
public void postDeregister()(Code)



postRegister
public void postRegister(Boolean registrationDone)(Code)



preDeregister
public void preDeregister() throws Exception(Code)



preRegister
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception(Code)



purgeRelations
public void purgeRelations() throws RelationServiceNotRegisteredException(Code)



removeRelation
public void removeRelation(String relationId) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException(Code)



removeRelationType
public void removeRelationType(String relTypeName) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationTypeNotFoundException(Code)



sendRelationCreationNotification
public void sendRelationCreationNotification(String relationId) throws IllegalArgumentException, RelationNotFoundException(Code)



sendRelationRemovalNotification
public void sendRelationRemovalNotification(String relationId, List unregMBeanList) throws IllegalArgumentException, RelationNotFoundException(Code)



sendRoleUpdateNotification
public void sendRoleUpdateNotification(String relationId, Role newRole, List oldRoleValue) throws IllegalArgumentException, RelationNotFoundException(Code)



setPurgeFlag
public void setPurgeFlag(boolean flag)(Code)
Sets the flag to indicate if when a notification is received for the unregistration of a MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called.

true is immediate purge.
Parameters:
  flag - flag




setRole
public void setRole(String relationId, Role role) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException, RoleNotFoundException, InvalidRoleValueException(Code)



setRoles
public RoleResult setRoles(String relationId, RoleList roleList) throws RelationServiceNotRegisteredException, IllegalArgumentException, RelationNotFoundException(Code)



updateRoleMap
public void updateRoleMap(String relationId, Role role, List oldRoleValue) throws IllegalArgumentException, RelationServiceNotRegisteredException, RelationNotFoundException(Code)



Methods inherited from javax.management.NotificationBroadcasterSupport
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)(Code)(Java Doc)
public MBeanNotificationInfo[] getNotificationInfo()(Code)(Java Doc)
protected void handleNotification(NotificationListener listener, Notification notif, Object handback)(Code)(Java Doc)
public synchronized void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException(Code)(Java Doc)
public synchronized void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException(Code)(Java Doc)
public void sendNotification(Notification notification)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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