org.norther.tammi.core.relation
Class RelationService
java.lang.Object
javax.management.NotificationBroadcasterSupport
javax.management.relation.RelationService
org.norther.tammi.core.relation.RelationService
- All Implemented Interfaces:
- Serializable, EventListener, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, NotificationListener, RelationServiceMBean, ReferableMBean
public class RelationService
- extends RelationService
- implements RelationServiceMBean, MBeanRegistration, NotificationBroadcaster, Serializable
A configurable relation service.
- Author:
- Ilkka Priha
- See Also:
- Serialized Form
|
Constructor Summary |
RelationService(boolean theImmediatePurgeFlag)
Constructs a new relation service. |
RelationService(Boolean theImmediatePurgeFlag)
Constructs a new relation service with java.lang.Boolean parameters as
some MBean servers have difficulties with booleans. |
| Methods inherited from class javax.management.relation.RelationService |
addRelation, checkRoleReading, checkRoleWriting, createRelation, createRelationType, findAssociatedMBeans, findReferencingRelations, findRelationsOfType, getAllRelationIds, getAllRelationTypeNames, getAllRoles, getPurgeFlag, getReferencedMBeans, getRelationTypeName, getRole, getRoleCardinality, getRoleInfo, getRoleInfos, getRoles, handleNotification, hasRelation, isActive, isRelation, isRelationMBean, purgeRelations, sendRelationCreationNotification, sendRelationRemovalNotification, sendRoleUpdateNotification, setPurgeFlag, setRole, setRoles, updateRoleMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.management.relation.RelationServiceMBean |
addRelation, checkRoleReading, checkRoleWriting, createRelation, createRelationType, findAssociatedMBeans, findReferencingRelations, findRelationsOfType, getAllRelationIds, getAllRelationTypeNames, getAllRoles, getPurgeFlag, getReferencedMBeans, getRelationTypeName, getRole, getRoleCardinality, getRoleInfo, getRoleInfos, getRoles, hasRelation, isActive, isRelation, isRelationMBean, purgeRelations, sendRelationCreationNotification, sendRelationRemovalNotification, sendRoleUpdateNotification, setPurgeFlag, setRole, setRoles, updateRoleMap |
RelationService
public RelationService(boolean theImmediatePurgeFlag)
- Constructs a new relation service.
- Parameters:
theImmediatePurgeFlag - a flag for auto purge.
RelationService
public RelationService(Boolean theImmediatePurgeFlag)
- Constructs a new relation service with java.lang.Boolean parameters as
some MBean servers have difficulties with booleans.
- Parameters:
theImmediatePurgeFlag - a flag for auto purge.
preRegister
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
- Specified by:
preRegister in interface MBeanRegistration- Overrides:
preRegister in class RelationService
- Throws:
Exception
postRegister
public void postRegister(Boolean done)
- Specified by:
postRegister in interface MBeanRegistration- Overrides:
postRegister in class RelationService
preDeregister
public void preDeregister()
throws Exception
- Specified by:
preDeregister in interface MBeanRegistration- Overrides:
preDeregister in class RelationService
- Throws:
Exception
postDeregister
public void postDeregister()
- Specified by:
postDeregister in interface MBeanRegistration- Overrides:
postDeregister in class RelationService
getMBean
public MBeanReference getMBean()
- Description copied from interface:
ReferableMBean
- Gets a reference to the MBean.
- Specified by:
getMBean in interface ReferableMBean
- Returns:
- a reference to the MBean.
getNotificationInfo
public MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo in interface NotificationBroadcaster- Overrides:
getNotificationInfo in class RelationService
addNotificationListener
public void addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
- Specified by:
addNotificationListener in interface NotificationBroadcaster- Overrides:
addNotificationListener in class NotificationBroadcasterSupport
removeNotificationListener
public void removeNotificationListener(NotificationListener listener)
throws ListenerNotFoundException
- Specified by:
removeNotificationListener in interface NotificationBroadcaster- Overrides:
removeNotificationListener in class NotificationBroadcasterSupport
- Throws:
ListenerNotFoundException
addRelationType
public void addRelationType(RelationType theRelType)
throws InvalidRelationTypeException
- Specified by:
addRelationType in interface RelationServiceMBean- Overrides:
addRelationType in class RelationService
- Throws:
InvalidRelationTypeException
removeRelationType
public void removeRelationType(String theRelTypeName)
throws RelationServiceNotRegisteredException,
RelationTypeNotFoundException
- Specified by:
removeRelationType in interface RelationServiceMBean- Overrides:
removeRelationType in class RelationService
- Throws:
RelationServiceNotRegisteredException
RelationTypeNotFoundException
checkRoleWriting
public Integer checkRoleWriting(Role theRole,
Set oldActors,
ObjectName addedActor,
ObjectName removedActor,
String theRelTypeName,
Boolean theInitFlg)
throws RelationTypeNotFoundException
- Throws:
RelationTypeNotFoundException
removeRelation
public void removeRelation(String theRelId)
throws RelationNotFoundException,
RelationServiceNotRegisteredException
- Marks the relation to be removed from the service.
- Specified by:
removeRelation in interface RelationServiceMBean- Overrides:
removeRelation in class RelationService
- Parameters:
theRelId - the id of the relation to be removed.
- Throws:
RelationNotFoundException - if the relation is not found.
RelationServiceNotRegisteredException - if the service is not
registered.
Copyright © 2004 The Norther Organization. All rights reserved.