Sonic Management API

com.sonicsw.mq.common.runtime
Interface IConnectionTreeNode


public interface IConnectionTreeNode

This interface represents a node in the tree of connection members obtained via the IBrokerProxy getConnectionTree() method. The node references basic information about the associated connection member (IConnectionMemberInfo), along with any retrieved parents and children in the connection tree.

If the entire connection tree is retrieved there will be an empty root node whose child nodes represent the broker's connections. The nodes for these connections will typically have children representing sessions (or connection consumers), and so on.

See Also:
com.sonicsw.mq.mgmtapi.runtime.IBrokerProxy#getConnectionTree(java.util.ArrayList, int)

Method Summary
 java.util.ArrayList getChildren()
          Gets an ArrayList of child IConnectionTreeNodes.
 IConnectionMemberInfo getInfo()
          Gets the IConnectionMemberInfo corresponding to this node.
 IConnectionTreeNode getParent()
          Gets the parent IConnectionTreeNode for this member.
 void graftToParent(IConnectionTreeNode parent)
          This 'advanced use' method grafts a sub-tree of connection members into a larger tree of connection members that has been fetched previously.
 

Method Detail

getChildren

java.util.ArrayList getChildren()
Gets an ArrayList of child IConnectionTreeNodes. Returns null if the node has no children or if the children have not been fetched.

Note: getInfo().getChildRefs().size() will give the actual number of children regardless of whether or not the child connection tree nodes have been fetched.


getInfo

IConnectionMemberInfo getInfo()
Gets the IConnectionMemberInfo corresponding to this node. Returns null if this is the connection tree's root node.


getParent

IConnectionTreeNode getParent()
Gets the parent IConnectionTreeNode for this member. Returns null if the the parent has not been fetched or this is the root node.


graftToParent

void graftToParent(IConnectionTreeNode parent)
                   throws ConnectionTreeUpdateException
This 'advanced use' method grafts a sub-tree of connection members into a larger tree of connection members that has been fetched previously. For example, a GUI application might fetch and display the complete connection member tree, then allow the user to refresh just a part of that tree. The root node of the sub-tree returned by the subsequent getConnectionTree() call (for the partial refresh) can then be grafted into the full tree.

graftToParent() does the following:

The parent must already know about the connection member associated with this node. In other words, it must already have a child node whose associated connection member reference matches that of this node. It's not possible to associate an arbitrary node with any parent.

Parameters:
parent - parent node to attach this node to
Throws:
ConnectionTreeUpdateException - if the node is already attached to a parent, or if the connection member associated with this node is not recognised by the parent

Sonic Management API

Copyright © 2001-2010 Progress Software Corporation. All Rights Reserved.
HTML formatted on 16-Sep-2010.