org.norther.tammi.core.rt
Interface VariableTreeMBean

All Superinterfaces:
ReferableMBean, Relation, RelationMBean, RelationSupportMBean
All Known Subinterfaces:
VariableRootMBean
All Known Implementing Classes:
VariableRoot, VariableTree

public interface VariableTreeMBean
extends RelationMBean

VariableTreeMBean is an interface to a relation of variables forming a tree. VariableTreeMBean collects related variables under the same container. The relation consists of a mandatory base representing the relation itself and roles for any number of leaves and branches.

All notifications sent by members of the tree are automatically propagated to trunks of the tree until the root is reached. Relation notifications are sent as such, but others are wrapped by an actor notification.

Author:
Ilkka Priha

Field Summary
static String BEAN_TREE_RELATION
          The tree relation MBean.
static String ROLE_BASE
          The tree base role.
static String ROLE_BRANCH
          The tree branch role.
static String ROLE_LEAF
          The tree leaf role.
 
Fields inherited from interface org.norther.tammi.core.base.ReferableMBean
DEFAULT_ID, ID, MBEAN, MBEAN_DESCRIPTION, 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.
 boolean isUnregisterRemovedActors()
          Gets the unregister removed actors option.
 void notifyVariableTree()
          Notifies the tree by sending a modification notification.
 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 setBaseName(ObjectName name)
          Sets the base.
 void setUnregisterRemovedActors(boolean flag)
          Sets the unregister removed actors option.
 
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, setRelationServiceManagementFlag
 
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

ROLE_BASE

static final String ROLE_BASE
The tree base role.

See Also:
Constant Field Values

ROLE_LEAF

static final String ROLE_LEAF
The tree leaf role.

See Also:
Constant Field Values

ROLE_BRANCH

static final String ROLE_BRANCH
The tree branch role.

See Also:
Constant Field Values

BEAN_TREE_RELATION

static final String BEAN_TREE_RELATION
The tree relation MBean.

See Also:
Constant Field Values
Method Detail

getBaseName

ObjectName getBaseName()
Gets the object name of the base.

Returns:
the object name of the base or null.

setBaseName

void setBaseName(ObjectName name)
                 throws LogException
Sets the base.

Note that the base can be set only once the relation is included in the relation service.

Parameters:
name - the object name of the base.
Throws:
LogException - on errors.

getBase

Variable getBase()
Gets the referent of the base MBean.

Returns:
the referent of the base MBean or null.

getLeaf

Variable getLeaf(ObjectName name)
Gets the reference of the named leaf MBean.

Parameters:
name - the name of the leaf.
Returns:
the referent of the leaf MBean or null.

getLeafNames

List getLeafNames()
Gets object names of leaves.

Returns:
a list of object names of leaves.

getLeaves

List getLeaves()
Gets referents of leaf MBeans.

Returns:
a list of referents of leaf MBeans.

addLeafName

boolean addLeafName(ObjectName name)
                    throws LogException
Adds a new leaf.

Parameters:
name - the object name of the leaf.
Returns:
true if added, otherwise false.
Throws:
LogException - on errors.

addLeafNames

boolean addLeafNames(Collection names)
                     throws LogException
Adds new leaves.

Parameters:
names - a collection of object names.
Returns:
true if added, otherwise false.
Throws:
LogException - on errors.

removeLeafName

boolean removeLeafName(ObjectName name)
Removes a leaf.

Parameters:
name - the object name of the leaf.
Returns:
true if removed, otherwie false.

removeLeafNames

boolean removeLeafNames(Collection names)
Removes leaves.

Parameters:
names - a collection of object names.
Returns:
true if removed, otherwise false.

containsLeafName

boolean containsLeafName(ObjectName name)
Checks whether there is a specific leaf.

Parameters:
name - the object name of the leaf.
Returns:
true if the leaf exists, otherwise false.

clearLeafNames

boolean clearLeafNames()
Clears all leaves.

Returns:
true if clearing was succesful.

getBranch

VariableTreeMBean getBranch(ObjectName name)
Gets the referent of the named branch MBean.

Parameters:
name - the name of the branch.
Returns:
the referent of the branch MBean or null.

getBranchNames

List getBranchNames()
Gets object names of branches.

Returns:
a list of object names of branches.

getBranches

List getBranches()
Gets referents of branch MBeans.

Returns:
a list of referents of branch MBeans.

addBranchName

boolean addBranchName(ObjectName name)
                      throws LogException
Adds a new branch. The branch must be registered, included in the relation service and contain a valid base.

Parameters:
name - the object name of the branch.
Returns:
true if added, otherwise false.
Throws:
LogException - on errors.

addBranchNames

boolean addBranchNames(Collection names)
                       throws LogException
Adds new branches. The branches must be registered, included in the relation service and contain a valid base.

Parameters:
names - a collection of object names.
Returns:
true if added, otherwise false.
Throws:
LogException - on errors.

removeBranchName

boolean removeBranchName(ObjectName name)
Removes a branch.

Parameters:
name - the object name of the branch.
Returns:
true if removed, otherwise false.

removeBranchNames

boolean removeBranchNames(Collection names)
Removes branches.

Parameters:
names - a collection of object names.
Returns:
true if removed, otherwise false.

containsBranchName

boolean containsBranchName(ObjectName name)
Checks whether there is a specific branch.

Parameters:
name - the object name of the branch.
Returns:
true if the branch exists, otherwise false.

clearBranchNames

boolean clearBranchNames()
Clears all branches.

Returns:
true if clearing was succesful.

isUnregisterRemovedActors

boolean isUnregisterRemovedActors()
Gets the unregister removed actors option.

Returns:
true if removed leaves and branches should be unregistered.

setUnregisterRemovedActors

void setUnregisterRemovedActors(boolean flag)
Sets the unregister removed actors option.

Parameters:
flag - the option value to set.

notifyVariableTree

void notifyVariableTree()
Notifies the tree by sending a modification notification.



Copyright © 2004 The Norther Organization. All rights reserved.