

Classes | |
| class | NoLeafNode |
Public Member Functions | |
| LogLvlTreeModel (ORB theOrb, Logger theLogger) | |
| void | start () throws Exception |
| void | stop () |
| void | refreshTree () |
| DefaultMutableTreeNode | findNode (DefaultMutableTreeNode node, String name, int handle) |
| void | clientLoggedIn (ClientInfo clientInfo) |
| void | clientLoggedOut (int clientHandle) |
| void | componentLoggedIn (ComponentInfo compInfo) |
| void | componentReleased (ComponentInfo compInfo) |
| void | componentLoggedOut (int compHandle) |
| void | containerLoggedIn (ContainerInfo contInfo) |
| void | containerLoggedOut (int conthandle) |
| void | showComponents (boolean show) |
| void | showClients (boolean show) |
| Manager | getManagerRef () |
Protected Member Functions | |
| boolean | isManagerNode (DefaultMutableTreeNode selNode) |
Private Member Functions | |
| void | buildManagersNode () |
| void | buildClientsNode () |
| void | buildContainersNode () |
| void | buildComponentsNode () |
| String | formatManagerLoc (String manLoc) |
| boolean | checkNodeContent (DefaultMutableTreeNode node, String name, int handle) |
| void | updateComponent (ComponentInfo info) |
| void | removeComponent (int handle) |
| void | removeFromComponentSubtree (int compHandle) |
| void | addNode (TreeContentInfo newItem, DefaultMutableTreeNode node) |
Private Attributes | |
| AdministratorClient | admin = null |
| ORB | orb = null |
| Logger | log = null |
| DefaultMutableTreeNode | rootNode = null |
| DefaultMutableTreeNode | managersNode = new NoLeafNode("Managers") |
| DefaultMutableTreeNode | clientsNode = new NoLeafNode("Clients") |
| DefaultMutableTreeNode | containersNode = new NoLeafNode("Containers") |
| DefaultMutableTreeNode | componentsNode = new NoLeafNode("Components") |
The model for the tree of containers/components
| alma::acs::gui::loglevel::tree::LogLvlTreeModel::LogLvlTreeModel | ( | ORB | theOrb, | |
| Logger | theLogger | |||
| ) | [inline] |
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::addNode | ( | TreeContentInfo | newItem, | |
| DefaultMutableTreeNode | node | |||
| ) | [inline, private] |
Add an entry to a node. The new node is inserted ordered by its name.
| newItem | The new entry to add | |
| node | The node where the entry has to be addded |
References alma::acs::gui::loglevel::tree::node::TreeContentInfo::getName().
Referenced by clientLoggedIn(), componentLoggedIn(), containerLoggedIn(), and updateComponent().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::buildClientsNode | ( | ) | [inline, private] |
Build the node of clients by reading the active clients
| clients |
References admin, clientLoggedIn(), clientsNode, and alma::acs::gui::loglevel::tree::AdministratorClient::retrieveClientInfo().
Referenced by refreshTree().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::buildComponentsNode | ( | ) | [inline, private] |
Build the list of components by reading the running components
| container |
References admin, componentLoggedIn(), and alma::acs::gui::loglevel::tree::AdministratorClient::retrieveComponentInfo().
Referenced by refreshTree().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::buildContainersNode | ( | ) | [inline, private] |
Build the node of containers by reading the active containers
References admin, containerLoggedIn(), containersNode, and alma::acs::gui::loglevel::tree::AdministratorClient::retrieveContainerInfo().
Referenced by refreshTree().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::buildManagersNode | ( | ) | [inline, private] |
Build the node of managers
References admin, formatManagerLoc(), alma::acs::gui::loglevel::tree::AdministratorClient::getManagerLoc(), and managersNode.
Referenced by refreshTree().
| boolean alma::acs::gui::loglevel::tree::LogLvlTreeModel::checkNodeContent | ( | DefaultMutableTreeNode | node, | |
| String | name, | |||
| int | handle | |||
| ) | [inline, private] |
Check the content of the passed node. The check is done taking the content of the Node and checking if its name (or handle) is equal to the passed parameter. The comparison is done on the name if the name param is not null, otherwise on the handle.
If the node is the root, name is checked against the string or rootNode
| node | The node whose content has to be checked | |
| name | The name of the component/client/container If it is null, it is ignored | |
| handle | The handle (ignored if the name is not null) |
References alma::acs::gui::loglevel::tree::node::TreeContentInfo::compareHandle(), and alma::acs::gui::loglevel::tree::node::TreeContentInfo::compareName().
Referenced by findNode().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::clientLoggedIn | ( | ClientInfo | clientInfo | ) | [inline] |
Implements alma::acs::gui::loglevel::tree::LogLevelListener.
References addNode(), and clientsNode.
Referenced by buildClientsNode().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::clientLoggedOut | ( | int | clientHandle | ) | [inline] |
Implements alma::acs::gui::loglevel::tree::LogLevelListener.
References clientsNode, and findNode().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentLoggedIn | ( | ComponentInfo | compInfo | ) | [inline] |
Implements alma::acs::gui::loglevel::tree::LogLevelListener.
References addNode(), componentsNode, and updateComponent().
Referenced by buildComponentsNode().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentLoggedOut | ( | int | compHandle | ) | [inline] |
Implements alma::acs::gui::loglevel::tree::LogLevelListener.
References removeComponent(), and removeFromComponentSubtree().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentReleased | ( | ComponentInfo | compInfo | ) | [inline] |
Implements alma::acs::gui::loglevel::tree::LogLevelListener.
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::containerLoggedIn | ( | ContainerInfo | contInfo | ) | [inline] |
Implements alma::acs::gui::loglevel::tree::LogLevelListener.
References addNode(), containersNode, findNode(), and si::ijs::maci::ContainerInfo::name.
Referenced by buildContainersNode().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::containerLoggedOut | ( | int | conthandle | ) | [inline] |
Implements alma::acs::gui::loglevel::tree::LogLevelListener.
References containersNode, and findNode().
| DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::findNode | ( | DefaultMutableTreeNode | node, | |
| String | name, | |||
| int | handle | |||
| ) | [inline] |
Navigate the tree to find a container with the given name or handle. The search begins from the passed node and scans all the childs until it finds the node. The search is done comparing the name with the name of the item hold by the tree node and its childreen. If the name param is null, the handle is used.
The method is recursive.
| node | The root of the subtree to look for the node. If it is null, the search starts from the root. | |
| name | The name of the node i.e. the name of the client/conatainer/component hold by the node If null, the handle is used during the search | |
| handle | The handle of the client/component/container to search This param is used only if name is null |
References checkNodeContent().
Referenced by clientLoggedOut(), containerLoggedIn(), containerLoggedOut(), removeComponent(), removeFromComponentSubtree(), showClients(), showComponents(), alma::acs::gui::loglevel::tree::TreeMouseListener::TreeMouseListener(), and updateComponent().
| String alma::acs::gui::loglevel::tree::LogLvlTreeModel::formatManagerLoc | ( | String | manLoc | ) | [inline, private] |
Fromat the manager loc in a more readable string
| manLoc | The managerLoc (like corbaloc::....) |
Referenced by buildManagersNode(), and isManagerNode().
| Manager alma::acs::gui::loglevel::tree::LogLvlTreeModel::getManagerRef | ( | ) | [inline] |
Return the manager reference
References admin, and alma::acs::gui::loglevel::tree::AdministratorClient::getManagerRef().
Referenced by alma::acs::gui::loglevel::tree::TreeMouseListener::getLogConfFromManager().
| boolean alma::acs::gui::loglevel::tree::LogLvlTreeModel::isManagerNode | ( | DefaultMutableTreeNode | selNode | ) | [inline, protected] |
Returns if the given node is the manager
| selNode | the node to test |
References admin, formatManagerLoc(), and alma::acs::gui::loglevel::tree::AdministratorClient::getManagerLoc().
Referenced by alma::acs::gui::loglevel::tree::TreeMouseListener::showLoggingConfigTab().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::refreshTree | ( | ) | [inline] |
Build the tree. It read the clients, components and containers and add them to the tree.
References admin, buildClientsNode(), buildComponentsNode(), buildContainersNode(), buildManagersNode(), clientsNode, componentsNode, containersNode, managersNode, and rootNode.
Referenced by alma::acs::gui::loglevel::tree::TreePopupMenu::actionPerformed(), and start().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::removeComponent | ( | int | handle | ) | [inline, private] |
Remove all the occurrencies of the component with the given handle from the tree
| handle | The handle of the component to remove |
References containersNode, and findNode().
Referenced by componentLoggedOut().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::removeFromComponentSubtree | ( | int | compHandle | ) | [inline, private] |
Remove a node from the subtree of components
| compHandle | The handle of the component to remove |
References componentsNode, and findNode().
Referenced by componentLoggedOut().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::showClients | ( | boolean | show | ) | [inline] |
show/hide the clients subtree
| show | If true the clients node is set to visible |
References clientsNode, findNode(), and rootNode.
Referenced by alma::acs::gui::loglevel::tree::TreePopupMenu::actionPerformed().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::showComponents | ( | boolean | show | ) | [inline] |
show/hide the components subtree
| show | If true the components node is set to visible |
References componentsNode, findNode(), and rootNode.
Referenced by alma::acs::gui::loglevel::tree::TreePopupMenu::actionPerformed().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::start | ( | ) | throws Exception [inline] |
Start the computation
| Exception | if an error happens while connecting |
References alma::acs::gui::loglevel::tree::AdministratorClient::addLogListener(), admin, alma::acs::gui::loglevel::tree::AdministratorClient::connectToManager(), log, orb, and refreshTree().
Referenced by alma::acs::gui::loglevel::tree::LogLvlTree::start().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::stop | ( | ) | [inline] |
Terminate the computation
References alma::acs::gui::loglevel::tree::AdministratorClient::addLogListener(), admin, and alma::acs::gui::loglevel::tree::AdministratorClient::disconnect().
Referenced by alma::acs::gui::loglevel::tree::LogLvlTree::stop().
| void alma::acs::gui::loglevel::tree::LogLvlTreeModel::updateComponent | ( | ComponentInfo | info | ) | [inline, private] |
Add a component to its container if it is not already there
| info | The component to add to the container |
References addNode(), si::ijs::maci::ComponentInfo::container_name, containersNode, findNode(), and si::ijs::maci::ComponentInfo::name.
Referenced by componentLoggedIn().
Referenced by buildClientsNode(), buildComponentsNode(), buildContainersNode(), buildManagersNode(), getManagerRef(), isManagerNode(), refreshTree(), start(), and stop().
DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::clientsNode = new NoLeafNode("Clients") [private] |
Referenced by buildClientsNode(), clientLoggedIn(), clientLoggedOut(), refreshTree(), and showClients().
DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::componentsNode = new NoLeafNode("Components") [private] |
Referenced by componentLoggedIn(), refreshTree(), removeFromComponentSubtree(), and showComponents().
DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::containersNode = new NoLeafNode("Containers") [private] |
Referenced by buildContainersNode(), containerLoggedIn(), containerLoggedOut(), refreshTree(), removeComponent(), and updateComponent().
Logger alma::acs::gui::loglevel::tree::LogLvlTreeModel::log = null [private] |
Referenced by LogLvlTreeModel(), and start().
DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::managersNode = new NoLeafNode("Managers") [private] |
Referenced by buildManagersNode(), and refreshTree().
ORB alma::acs::gui::loglevel::tree::LogLvlTreeModel::orb = null [private] |
Referenced by LogLvlTreeModel(), and start().
DefaultMutableTreeNode alma::acs::gui::loglevel::tree::LogLvlTreeModel::rootNode = null [private] |
Referenced by refreshTree(), showClients(), and showComponents().
1.6.2