|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Referable
org.norther.tammi.core.relation.Relation
org.norther.tammi.core.rt.VariableTree
public class VariableTree
A default implementation of VariableTreeMBean.
| Nested Class Summary | |
|---|---|
protected static class |
VariableTree.VariableTreeType
The relation type of tree relations. |
| Field Summary | |
|---|---|
static String |
VARIABLE_TREE_NOTIF_DESCRIPTION
The notification description. |
static MBeanNotificationInfo[] |
VARIABLE_TREE_NOTIFICATONS
Variable tree notifications. |
static String |
VARIABLE_TREE_TYPE
The variable tree type name. |
| Fields inherited from class org.norther.tammi.core.relation.Relation |
|---|
RELATION_NOTIF_DESCRIPTION, RELATION_NOTIFICATIONS, roleUpdate |
| Fields inherited from class org.norther.tammi.core.base.Referable |
|---|
ID_LENGTH, REFERABLE_ATTRIBUTES, REFERABLE_NOTIF_DESCRIPTION, REFERABLE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.rt.VariableTreeMBean |
|---|
BEAN_TREE_RELATION, ROLE_BASE, ROLE_BRANCH, ROLE_LEAF |
| Fields inherited from interface org.norther.tammi.core.base.ReferableMBean |
|---|
DEFAULT_ID, ID, MBEAN, MBEAN_DESCRIPTION, TYPE |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
|
VariableTree()
Constructs a new relation. |
|
VariableTree(String id)
Constructs a new relation with a relation id. |
|
VariableTree(String id,
RoleList roles)
Constructs a new relation with a relation id and initial roles. |
protected |
VariableTree(String id,
String relTypeName,
RoleList roles)
Constructs a new relation with a relation id, initial roles and customized relation type. |
| Method Summary | |
|---|---|
boolean |
addBranchName(ObjectName name)
Adds a new branch. |
boolean |
addBranchNames(Collection names)
Adds new branches. |
boolean |
addLeafName(ObjectName name)
Adds a new leaf. |
boolean |
addLeafNames(Collection names)
Adds new leaves. |
boolean |
clearBranchNames()
Clears all branches. |
boolean |
clearLeafNames()
Clears all leaves. |
boolean |
containsBranchName(ObjectName name)
Checks whether there is a specific branch. |
boolean |
containsLeafName(ObjectName name)
Checks whether there is a specific leaf. |
Variable |
getBase()
Gets the referent of the base MBean. |
ObjectName |
getBaseName()
Gets the object name of the base. |
VariableTreeMBean |
getBranch(ObjectName name)
Gets the referent of the named branch MBean. |
List |
getBranches()
Gets referents of branch MBeans. |
List |
getBranchNames()
Gets object names of branches. |
Variable |
getLeaf(ObjectName name)
Gets the reference of the named leaf MBean. |
List |
getLeafNames()
Gets object names of leaves. |
List |
getLeaves()
Gets referents of leaf MBeans. |
MBeanNotificationInfo[] |
getNotificationInfo()
|
protected static RelationType |
getVariableTreeType()
Gets the tree relation type. |
void |
handleNotification(Notification notif,
Object handback)
A notification handler, which passes all notifications coming from the tree forward and maintains internal consistency of the tree. |
boolean |
hasListeners()
Returns true for listeners if removed actors are to be unregistered as the removal is performed in sendNotification and we need to get all notifications independently on registered listeners. |
boolean |
isUnregisterRemovedActors()
Gets the unregister removed actors option. |
void |
notifyVariableTree()
Notifies the tree by sending a modification notification. |
void |
postRegister(Boolean done)
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. |
boolean |
removeBranchName(ObjectName name)
Removes a branch. |
boolean |
removeBranchNames(Collection names)
Removes branches. |
boolean |
removeLeafName(ObjectName name)
Removes a leaf. |
boolean |
removeLeafNames(Collection names)
Removes leaves. |
void |
sendNotification(Notification notif)
Handles unregistration of removed actors after sending the corresponding notifications. |
void |
setBaseName(ObjectName name)
Sets the base. |
void |
setRelationServiceManagementFlag(Boolean theFlg)
Removes and optionally unregisters all actors if the relation is removed from the relation service. |
protected Object |
setRoleWithStatus(Role theRole,
ObjectName added,
ObjectName removed,
boolean update,
boolean forced)
Maintains the tree. |
void |
setUnregisterRemovedActors(boolean flag)
Sets the unregister removed actors option. |
protected void |
unregisterRemovedActors(String roleName,
Collection removed)
Unregisters removed actors. |
| Methods inherited from class org.norther.tammi.core.base.Referable |
|---|
addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNamePattern, getObjectName, getQueryPattern, getRegistrationTime, getSequenceNumber, getUniqueName, isUnregistered, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, setCanonicalName, setMBeanServer, setNamePattern, setObjectName, setQueryPattern, unregister, unregistered |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.relation.RelationMBean |
|---|
addActorName, addActorName, addActorNames, addToService, clearRole, getActor, getActor, getActor, getActorName, getActorName, getRelationService, getRoleActors, isNamedActorInRole, removeActorName, removeActorName, removeActorNames, removeFromService, retrieveRole, setActorName, setActorName |
| Methods inherited from interface javax.management.relation.RelationSupportMBean |
|---|
isInRelationService |
| Methods inherited from interface javax.management.relation.Relation |
|---|
getAllRoles, getReferencedMBeans, getRelationId, getRelationServiceName, getRelationTypeName, getRole, getRoleCardinality, getRoles, handleMBeanUnregistration, retrieveAllRoles, setRole, setRoles |
| Methods inherited from interface org.norther.tammi.core.base.ReferableMBean |
|---|
getMBean |
| Field Detail |
|---|
public static final String VARIABLE_TREE_TYPE
public static final String VARIABLE_TREE_NOTIF_DESCRIPTION
public static final MBeanNotificationInfo[] VARIABLE_TREE_NOTIFICATONS
| Constructor Detail |
|---|
public VariableTree()
public VariableTree(String id)
id - the relation id.
public VariableTree(String id,
RoleList roles)
id - the relation id.roles - an optional role list for initializing the relation.
protected VariableTree(String id,
String relTypeName,
RoleList roles)
id - the relation id.relTypeName - the customized relation type name.roles - an optional role list for initializing the relation.| Method Detail |
|---|
protected static RelationType getVariableTreeType()
public void postRegister(Boolean done)
Referable
postRegister in interface MBeanRegistrationpostRegister in class Relationdone - indicates whether or not the MBean has been registered.public void setRelationServiceManagementFlag(Boolean theFlg)
setRelationServiceManagementFlag in interface RelationSupportMBeansetRelationServiceManagementFlag in class RelationtheFlg - the flag.public ObjectName getBaseName()
VariableTreeMBean
getBaseName in interface VariableTreeMBeanpublic Variable getBase()
VariableTreeMBean
getBase in interface VariableTreeMBean
public void setBaseName(ObjectName name)
throws LogException
VariableTreeMBeanNote that the base can be set only once the relation is included in the relation service.
setBaseName in interface VariableTreeMBeanname - the object name of the base.
LogException - on errors.public Variable getLeaf(ObjectName name)
VariableTreeMBean
getLeaf in interface VariableTreeMBeanname - the name of the leaf.
public List getLeafNames()
VariableTreeMBean
getLeafNames in interface VariableTreeMBeanpublic List getLeaves()
VariableTreeMBean
getLeaves in interface VariableTreeMBean
public boolean addLeafName(ObjectName name)
throws LogException
VariableTreeMBean
addLeafName in interface VariableTreeMBeanname - the object name of the leaf.
LogException - on errors.
public boolean addLeafNames(Collection names)
throws LogException
VariableTreeMBean
addLeafNames in interface VariableTreeMBeannames - a collection of object names.
LogException - on errors.public boolean removeLeafName(ObjectName name)
VariableTreeMBean
removeLeafName in interface VariableTreeMBeanname - the object name of the leaf.
public boolean removeLeafNames(Collection names)
VariableTreeMBean
removeLeafNames in interface VariableTreeMBeannames - a collection of object names.
public boolean containsLeafName(ObjectName name)
VariableTreeMBean
containsLeafName in interface VariableTreeMBeanname - the object name of the leaf.
public boolean clearLeafNames()
VariableTreeMBean
clearLeafNames in interface VariableTreeMBeanpublic VariableTreeMBean getBranch(ObjectName name)
VariableTreeMBean
getBranch in interface VariableTreeMBeanname - the name of the branch.
public List getBranchNames()
VariableTreeMBean
getBranchNames in interface VariableTreeMBeanpublic List getBranches()
VariableTreeMBean
getBranches in interface VariableTreeMBean
public boolean addBranchName(ObjectName name)
throws LogException
VariableTreeMBean
addBranchName in interface VariableTreeMBeanname - the object name of the branch.
LogException - on errors.
public boolean addBranchNames(Collection names)
throws LogException
VariableTreeMBean
addBranchNames in interface VariableTreeMBeannames - a collection of object names.
LogException - on errors.public boolean removeBranchName(ObjectName name)
VariableTreeMBean
removeBranchName in interface VariableTreeMBeanname - the object name of the branch.
public boolean removeBranchNames(Collection names)
VariableTreeMBean
removeBranchNames in interface VariableTreeMBeannames - a collection of object names.
public boolean containsBranchName(ObjectName name)
VariableTreeMBean
containsBranchName in interface VariableTreeMBeanname - the object name of the branch.
public boolean clearBranchNames()
VariableTreeMBean
clearBranchNames in interface VariableTreeMBeanpublic boolean isUnregisterRemovedActors()
VariableTreeMBean
isUnregisterRemovedActors in interface VariableTreeMBeanpublic void setUnregisterRemovedActors(boolean flag)
VariableTreeMBean
setUnregisterRemovedActors in interface VariableTreeMBeanflag - the option value to set.public void notifyVariableTree()
VariableTreeMBean
notifyVariableTree in interface VariableTreeMBeanpublic void sendNotification(Notification notif)
sendNotification in interface MBeanDelegatesendNotification in class Referablenotif - the notification.public boolean hasListeners()
hasListeners in interface MBeanDelegatehasListeners in class Referablepublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class Relation
public void handleNotification(Notification notif,
Object handback)
handleNotification in interface NotificationListenerhandleNotification in class Relationnotif - the notification.handback - a hand-back object.
protected Object setRoleWithStatus(Role theRole,
ObjectName added,
ObjectName removed,
boolean update,
boolean forced)
throws RoleNotFoundException,
InvalidRoleValueException,
RelationNotFoundException,
RelationTypeNotFoundException,
RelationServiceNotRegisteredException
setRoleWithStatus in class RelationtheRole - the role to be set.added - an optional added actor.removed - an optional removed actor.update - a flag to update configurable actors.forced - a flag for forced writing without a check.
RoleNotFoundException - if there is no role with the given name.
InvalidRoleValueException - if the value provided for the role is
not valid.
RelationNotFoundException - if the relation has not been added in
the service.
RelationTypeNotFoundException - if the relation type has not been
declared.
RelationServiceNotRegisteredException - if the service is not
registered.
protected void unregisterRemovedActors(String roleName,
Collection removed)
roleName - the role name.removed - a collection of removed actors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||