javax.management.relation
Class RelationService
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--javax.management.relation.RelationService
- All Implemented Interfaces:
- java.util.EventListener, MBeanRegistration, NotificationBroadcaster, NotificationListener, RelationServiceMBean
- public class RelationService
- extends NotificationBroadcasterSupport
- implements RelationServiceMBean, MBeanRegistration, NotificationListener
- Version:
- $Revision: 1.8 $
- Author:
- Bronwen Cassidy
|
Method Summary |
void |
addRelation(ObjectName relationMBeanObjectName)
Add relation of a class that extends RelationSupport, is an external relation and can only be created with this method
createRelation() is for internal relations only |
void |
addRelationType(RelationType relationType)
|
java.lang.Integer |
checkRoleReading(java.lang.String roleName,
java.lang.String relationTypeName)
|
java.lang.Integer |
checkRoleWriting(Role role,
java.lang.String relationTypeName,
java.lang.Boolean isInitialized)
|
void |
createRelation(java.lang.String relationId,
java.lang.String relationTypeName,
RoleList roleList)
According to the RI spec this method is used only to create internal relations
so can instantiate the InternalRelation class here and isRelationMBean() should return null. |
void |
createRelationType(java.lang.String relationTypeName,
RoleInfo[] roleInfos)
|
java.util.Map |
findAssociatedMBeans(ObjectName mbeanObjectName,
java.lang.String relationTypeName,
java.lang.String roleName)
|
java.util.Map |
findReferencingRelations(ObjectName mbeanObjectName,
java.lang.String relationTypeName,
java.lang.String roleName)
|
java.util.List |
findRelationsOfType(java.lang.String relationTypeName)
|
java.util.List |
getAllRelationIds()
|
java.util.List |
getAllRelationTypeNames()
|
RoleResult |
getAllRoles(java.lang.String relationId)
|
MBeanNotificationInfo[] |
getNotificationInfo()
Implement to return more info regarding Notification Types |
boolean |
getPurgeFlag()
|
java.util.Map |
getReferencedMBeans(java.lang.String relationId)
|
java.lang.String |
getRelationTypeName(java.lang.String relationId)
|
java.util.List |
getRole(java.lang.String relationId,
java.lang.String roleName)
|
java.lang.Integer |
getRoleCardinality(java.lang.String relationId,
java.lang.String roleName)
|
RoleInfo |
getRoleInfo(java.lang.String relationTypeName,
java.lang.String roleInfoName)
|
java.util.List |
getRoleInfos(java.lang.String relationTypeName)
|
RoleResult |
getRoles(java.lang.String relationId,
java.lang.String[] roleNames)
|
void |
handleNotification(Notification notification,
java.lang.Object handback)
|
java.lang.Boolean |
hasRelation(java.lang.String relationId)
|
void |
isActive()
|
java.lang.String |
isRelation(ObjectName objectName)
|
ObjectName |
isRelationMBean(java.lang.String relationId)
|
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
|
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
|
void |
purgeRelations()
|
void |
removeRelation(java.lang.String relationId)
|
void |
removeRelationType(java.lang.String relationTypeName)
|
void |
sendRelationCreationNotification(java.lang.String relationId)
|
void |
sendRelationRemovalNotification(java.lang.String relationId,
java.util.List unregisteredMBeanList)
|
void |
sendRoleUpdateNotification(java.lang.String relationId,
Role newRole,
java.util.List oldRoleValues)
|
void |
setPurgeFlag(boolean purgeFlag)
|
void |
setRole(java.lang.String relationId,
Role role)
|
RoleResult |
setRoles(java.lang.String relationId,
RoleList roleList)
|
void |
updateRoleMap(java.lang.String relationId,
Role role,
java.util.List oldRoleValues)
Handles update of the RelationService role map for the update of given roles in a given relation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RelationService
public RelationService(boolean purgeFlag)
isActive
public void isActive()
throws RelationServiceNotRegisteredException
- Specified by:
isActive in interface RelationServiceMBean
getPurgeFlag
public boolean getPurgeFlag()
- Specified by:
getPurgeFlag in interface RelationServiceMBean
setPurgeFlag
public void setPurgeFlag(boolean purgeFlag)
- Specified by:
setPurgeFlag in interface RelationServiceMBean
createRelationType
public void createRelationType(java.lang.String relationTypeName,
RoleInfo[] roleInfos)
throws java.lang.IllegalArgumentException,
InvalidRelationTypeException
- Specified by:
createRelationType in interface RelationServiceMBean
addRelationType
public void addRelationType(RelationType relationType)
throws java.lang.IllegalArgumentException,
InvalidRelationTypeException
- Specified by:
addRelationType in interface RelationServiceMBean
getAllRelationTypeNames
public java.util.List getAllRelationTypeNames()
- Specified by:
getAllRelationTypeNames in interface RelationServiceMBean
getRoleInfos
public java.util.List getRoleInfos(java.lang.String relationTypeName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
- Specified by:
getRoleInfos in interface RelationServiceMBean
getRoleInfo
public RoleInfo getRoleInfo(java.lang.String relationTypeName,
java.lang.String roleInfoName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException,
RoleInfoNotFoundException
- Specified by:
getRoleInfo in interface RelationServiceMBean
removeRelationType
public void removeRelationType(java.lang.String relationTypeName)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationTypeNotFoundException
- Specified by:
removeRelationType in interface RelationServiceMBean
createRelation
public void createRelation(java.lang.String relationId,
java.lang.String relationTypeName,
RoleList roleList)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RoleNotFoundException,
InvalidRelationIdException,
RelationTypeNotFoundException,
InvalidRoleValueException
- According to the RI spec this method is used only to create internal relations
so can instantiate the InternalRelation class here and isRelationMBean() should return null.
- Specified by:
createRelation in interface RelationServiceMBean
addRelation
public void addRelation(ObjectName relationMBeanObjectName)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
java.lang.NoSuchMethodException,
InvalidRelationIdException,
InstanceNotFoundException,
InvalidRelationServiceException,
RelationTypeNotFoundException,
RoleNotFoundException,
InvalidRoleValueException
- Add relation of a class that extends RelationSupport, is an external relation and can only be created with this method
createRelation() is for internal relations only
- Specified by:
addRelation in interface RelationServiceMBean
isRelationMBean
public ObjectName isRelationMBean(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
- Specified by:
isRelationMBean in interface RelationServiceMBean
isRelation
public java.lang.String isRelation(ObjectName objectName)
throws java.lang.IllegalArgumentException
- Specified by:
isRelation in interface RelationServiceMBean
hasRelation
public java.lang.Boolean hasRelation(java.lang.String relationId)
throws java.lang.IllegalArgumentException
- Specified by:
hasRelation in interface RelationServiceMBean
getAllRelationIds
public java.util.List getAllRelationIds()
- Specified by:
getAllRelationIds in interface RelationServiceMBean
checkRoleReading
public java.lang.Integer checkRoleReading(java.lang.String roleName,
java.lang.String relationTypeName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
- Specified by:
checkRoleReading in interface RelationServiceMBean
checkRoleWriting
public java.lang.Integer checkRoleWriting(Role role,
java.lang.String relationTypeName,
java.lang.Boolean isInitialized)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
- Specified by:
checkRoleWriting in interface RelationServiceMBean
sendRelationCreationNotification
public void sendRelationCreationNotification(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
- Specified by:
sendRelationCreationNotification in interface RelationServiceMBean
sendRoleUpdateNotification
public void sendRoleUpdateNotification(java.lang.String relationId,
Role newRole,
java.util.List oldRoleValues)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
- Specified by:
sendRoleUpdateNotification in interface RelationServiceMBean
sendRelationRemovalNotification
public void sendRelationRemovalNotification(java.lang.String relationId,
java.util.List unregisteredMBeanList)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
- Specified by:
sendRelationRemovalNotification in interface RelationServiceMBean
updateRoleMap
public void updateRoleMap(java.lang.String relationId,
Role role,
java.util.List oldRoleValues)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationNotFoundException
- Handles update of the RelationService role map for the update of given roles in a given relation
- Specified by:
updateRoleMap in interface RelationServiceMBean
removeRelation
public void removeRelation(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationNotFoundException
- Specified by:
removeRelation in interface RelationServiceMBean
purgeRelations
public void purgeRelations()
throws RelationServiceNotRegisteredException
- Specified by:
purgeRelations in interface RelationServiceMBean
findReferencingRelations
public java.util.Map findReferencingRelations(ObjectName mbeanObjectName,
java.lang.String relationTypeName,
java.lang.String roleName)
throws java.lang.IllegalArgumentException
- Specified by:
findReferencingRelations in interface RelationServiceMBean
findAssociatedMBeans
public java.util.Map findAssociatedMBeans(ObjectName mbeanObjectName,
java.lang.String relationTypeName,
java.lang.String roleName)
throws java.lang.IllegalArgumentException
- Specified by:
findAssociatedMBeans in interface RelationServiceMBean
findRelationsOfType
public java.util.List findRelationsOfType(java.lang.String relationTypeName)
throws java.lang.IllegalArgumentException,
RelationTypeNotFoundException
- Specified by:
findRelationsOfType in interface RelationServiceMBean
getRole
public java.util.List getRole(java.lang.String relationId,
java.lang.String roleName)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationNotFoundException,
RoleNotFoundException
- Specified by:
getRole in interface RelationServiceMBean
getRoles
public RoleResult getRoles(java.lang.String relationId,
java.lang.String[] roleNames)
throws java.lang.IllegalArgumentException,
RelationNotFoundException,
RelationServiceNotRegisteredException
- Specified by:
getRoles in interface RelationServiceMBean
getAllRoles
public RoleResult getAllRoles(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException,
RelationServiceNotRegisteredException
- Specified by:
getAllRoles in interface RelationServiceMBean
getRoleCardinality
public java.lang.Integer getRoleCardinality(java.lang.String relationId,
java.lang.String roleName)
throws java.lang.IllegalArgumentException,
RelationNotFoundException,
RoleNotFoundException
- Specified by:
getRoleCardinality in interface RelationServiceMBean
setRole
public void setRole(java.lang.String relationId,
Role role)
throws java.lang.IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationNotFoundException,
RoleNotFoundException,
InvalidRoleValueException,
RelationTypeNotFoundException
- Specified by:
setRole in interface RelationServiceMBean
setRoles
public RoleResult setRoles(java.lang.String relationId,
RoleList roleList)
throws RelationServiceNotRegisteredException,
java.lang.IllegalArgumentException,
RelationNotFoundException
- Specified by:
setRoles in interface RelationServiceMBean
getReferencedMBeans
public java.util.Map getReferencedMBeans(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
- Specified by:
getReferencedMBeans in interface RelationServiceMBean
getRelationTypeName
public java.lang.String getRelationTypeName(java.lang.String relationId)
throws java.lang.IllegalArgumentException,
RelationNotFoundException
- Specified by:
getRelationTypeName in interface RelationServiceMBean
handleNotification
public void handleNotification(Notification notification,
java.lang.Object handback)
- Specified by:
handleNotification in interface NotificationListener
getNotificationInfo
public MBeanNotificationInfo[] getNotificationInfo()
- Implement to return more info regarding Notification Types
- Overrides:
getNotificationInfo in class NotificationBroadcasterSupport
preRegister
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws java.lang.Exception
- Specified by:
preRegister in interface MBeanRegistration
postRegister
public void postRegister(java.lang.Boolean registrationDone)
- Specified by:
postRegister in interface MBeanRegistration
preDeregister
public void preDeregister()
throws java.lang.Exception
- Specified by:
preDeregister in interface MBeanRegistration
postDeregister
public void postDeregister()
- Specified by:
postDeregister in interface MBeanRegistration