

Classes | |
| class | AdministratorImplementation |
| class | ManagerConnectionExceptionHandler |
| class | RefreshIfNeeded |
Public Member Functions | |
| void | setConnectsAutomatically (boolean b) |
| synchronized void | start () throws NoPermissionEx, CannotRetrieveManagerException, CorbaTransientException, CorbaNotExistException, UnknownErrorException |
| synchronized void | stop () |
| synchronized void | dismissManager () |
| boolean | isConnected () |
| int | myMaciHandle () throws NotConnectedToManagerException |
| String | getManagerLocation () |
| MaciInfo | getMaciInfo () throws NoPermissionEx, NotConnectedToManagerException, CorbaTransientException, CorbaNotExistException, UnknownErrorException |
| MaciInfo | getMaciInformation () |
| void | refreshSoon () |
| void | setRefreshesPeriodically (boolean b) |
| void | refreshNow () throws NoPermissionEx, NotConnectedToManagerException, SystemException, CorbaTransientException, CorbaNotExistException, UnknownErrorException |
| String | toString () |
Protected Member Functions | |
| MaciSupervisor (String clientName, String managerLoc, ORB orb, Logger log) | |
| Manager | myManagerReference () throws NotConnectedToManagerException |
| void | connectToManager () throws CannotRetrieveManagerException, NoPermissionEx, SystemException |
| void | disconnectFromManager () |
| ContainerInfo[] | retrieveContainerInfo (String name_wildcard) throws NotConnectedToManagerException, NoPermissionEx, SystemException |
| ClientInfo[] | retrieveClientInfo (String name_wildcard) throws NotConnectedToManagerException, NoPermissionEx, SystemException |
| ComponentInfo[] | retrieveComponentInfo (String name_wildcard) throws NotConnectedToManagerException, NoPermissionEx, SystemException |
| SortingTreeNode | createNode (Object info) |
| SortingTreeNode | createNode (Object info, boolean allowInfoDetails) |
| String | extractLocation (org.omg.CORBA.Object reference) |
Protected Attributes | |
| String | name = null |
| String | managerLoc = null |
| ORB | orb = null |
| Logger | log = null |
| boolean | connectsAutomatically = true |
| ManagerConnectionExceptionHandler | mcehandler |
| final MaciInfo | maciInfo |
| volatile boolean | refreshWithoutACause |
| volatile int | refreshCountdown |
| RefreshIfNeeded | refreshTask |
| Timer | timer = new Timer("MaciSupervisor.Refresher", true) |
| Manager | managerRef = null |
| volatile boolean | infoShouldBeRefreshed |
| ClientInfo | administratorClientInfo = null |
| AdministratorImplementation | acImpl |
| alma::acs::commandcenter::meta::MaciSupervisor::MaciSupervisor | ( | String | clientName, | |
| String | managerLoc, | |||
| ORB | orb, | |||
| Logger | log | |||
| ) | [inline, protected] |
Creates a MaciSupervisor running on the given ORB, it will connect to the specified manager.
| clientName | name-prefix like "AcsCommandCenter" or "OMC" | |
| managerLoc | the manager corbaloc | |
| orb | the orb to use |
References acImpl, createNode(), maciInfo, and name.
| void alma::acs::commandcenter::meta::MaciSupervisor::connectToManager | ( | ) | throws CannotRetrieveManagerException, NoPermissionEx, SystemException [inline, protected] |
| SortingTreeNode alma::acs::commandcenter::meta::MaciSupervisor::createNode | ( | Object | info, | |
| boolean | allowInfoDetails | |||
| ) | [inline, protected] |
Factory method, the boolean parameter supresses auto-generated sub-nodes
References si::ijs::maci::ComponentInfo::access, si::ijs::maci::ClientInfo::access, si::ijs::maci::ComponentInfo::clients, si::ijs::maci::ComponentInfo::code, si::ijs::maci::ClientInfo::components, si::ijs::maci::ComponentInfo::container, si::ijs::maci::ComponentInfo::container_name, createNode(), extractLocation(), si::ijs::maci::ComponentInfo::h, si::ijs::maci::ClientInfo::h, si::ijs::maci::ContainerInfo::h, si::ijs::maci::ComponentInfo::interfaces, si::ijs::maci::ComponentInfo::reference, si::ijs::maci::ClientInfo::reference, si::ijs::maci::ContainerInfo::reference, alma::acs::commandcenter::meta::MaciInfo::InfoDetail::representedHandles, alma::acs::commandcenter::meta::MaciInfo::SortingTreeNode::representedHandles, and si::ijs::maci::ComponentInfo::type.
| SortingTreeNode alma::acs::commandcenter::meta::MaciSupervisor::createNode | ( | Object | info | ) | [inline, protected] |
Factory method
Referenced by createNode(), MaciSupervisor(), and refreshNow().
| void alma::acs::commandcenter::meta::MaciSupervisor::disconnectFromManager | ( | ) | [inline, protected] |
| synchronized void alma::acs::commandcenter::meta::MaciSupervisor::dismissManager | ( | ) | [inline] |
msc (2004-11-09): This was requested, suggested, and agreed upon as a workaround for the situation where a manager has gone down (and the application using this macisupervisor knows that the manager is down, e.g. because it made it go down) while this macisupervisor does not yet know that the manager is down. It will only realize that the next time it tries to access it. Doing so will provoke some no_permission error messages in the manager log. To enable the application to avoid these error messages this API method was added.
Implements alma::acs::commandcenter::meta::IMaciSupervisor.
References administratorClientInfo.
Referenced by disconnectFromManager(), and alma::acs::commandcenter::gui::DeploymentTree::removeManager().
| String alma::acs::commandcenter::meta::MaciSupervisor::extractLocation | ( | org.omg.CORBA.Object | reference | ) | [inline, protected] |
Helper for createNode()
{host, port}, or null on failure References orb.
Referenced by createNode().
| MaciInfo alma::acs::commandcenter::meta::MaciSupervisor::getMaciInfo | ( | ) | throws NoPermissionEx, NotConnectedToManagerException, CorbaTransientException, CorbaNotExistException, UnknownErrorException [inline] |
Returns a TreeModel compiled from information from the Acs manager. The returned model will never become invalid during the lifetime of this MaciSupervisor, and it will be automatically updated.
A call to this method will automatically trigger a refresh, possibly throwing an exception or blocking the current thread for a long time. Calling getMaciInformation() and refreshSoon() will shield you from these effects.
null | NotConnectedToManagerException | ||
| NoPermissionEx | ||
| UnknownErrorException | ||
| CorbaNotExistException | ||
| CorbaTransientException |
Implements alma::acs::commandcenter::meta::IMaciSupervisor.
References maciInfo, and refreshNow().
Referenced by alma::acs::commandcenter::gui::DeploymentTree::shieldedRefreshManager().
| MaciInfo alma::acs::commandcenter::meta::MaciSupervisor::getMaciInformation | ( | ) | [inline] |
Returns a TreeModel compiled from information from the Acs manager. The returned model will never become invalid during the lifetime of this MaciSupervisor, and it will be automatically updated.
The returned model may be out-of-date. Call refreshSoon() to have it updated.
null References maciInfo.
| String alma::acs::commandcenter::meta::MaciSupervisor::getManagerLocation | ( | ) | [inline] |
Some people are interested in the weirdest things..
Implements alma::acs::commandcenter::meta::IMaciSupervisor.
References managerLoc.
Referenced by connectToManager(), alma::acs::commandcenter::gui::DeploymentTree::getManagerNode(), alma::acs::commandcenter::gui::DeploymentTree::Renderer::getTreeCellRendererComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerPing(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerShutdown(), alma::acs::commandcenter::gui::DeploymentTree::ManagerConnectionExceptionHandler::seemsManagerDoesNotExist(), alma::acs::commandcenter::gui::DeploymentTree::ManagerConnectionExceptionHandler::seemsManagerHasChangedOrHasCutConnection(), alma::acs::commandcenter::gui::DeploymentTree::ManagerConnectionExceptionHandler::seemsManagerIsDown(), and alma::acs::commandcenter::gui::DeploymentTree::ManagerConnectionExceptionHandler::seemsWeHaveDisconnected().
| boolean alma::acs::commandcenter::meta::MaciSupervisor::isConnected | ( | ) | [inline] |
Whether this is connected
Implements alma::acs::commandcenter::meta::IMaciSupervisor.
References administratorClientInfo.
Referenced by alma::acs::commandcenter::meta::MaciSupervisor::RefreshIfNeeded::run(), and start().
| int alma::acs::commandcenter::meta::MaciSupervisor::myMaciHandle | ( | ) | throws NotConnectedToManagerException [inline] |
| NotConnectedToManagerException |
Implements alma::acs::commandcenter::meta::IMaciSupervisor.
References administratorClientInfo, and si::ijs::maci::ClientInfo::h.
Referenced by disconnectFromManager(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerForceReleaseComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponentNonSticky(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerReleaseComponents(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerShutdown(), retrieveClientInfo(), retrieveComponentInfo(), and retrieveContainerInfo().
| Manager alma::acs::commandcenter::meta::MaciSupervisor::myManagerReference | ( | ) | throws NotConnectedToManagerException [inline, protected] |
| NotConnectedToManagerException |
References managerRef.
Referenced by disconnectFromManager(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerForceReleaseComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponentNonSticky(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerLogout(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerPing(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerReleaseComponents(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerShutdown(), retrieveClientInfo(), retrieveComponentInfo(), and retrieveContainerInfo().
| void alma::acs::commandcenter::meta::MaciSupervisor::refreshNow | ( | ) | throws NoPermissionEx, NotConnectedToManagerException, SystemException, CorbaTransientException, CorbaNotExistException, UnknownErrorException [inline] |
Tries to refresh the component-section, container-section, and client-section of the info tree model. The treemodel will be updated when things go well and also when things fail.
A call to this method will instantly perform a refresh, possibly throwing an exception or blocking the current thread for a long time. Calling getMaciInformation() and refreshSoon() will shield you from these effects.
| NoPermissionEx | error during refresh | |
| NotConnectedToManagerException | error during refresh | |
| CorbaTransientException | ||
| CorbaNotExistException | ||
| UnknownErrorException |
References createNode(), alma::acs::commandcenter::meta::MaciSupervisor::ManagerConnectionExceptionHandler::handleExceptionTalkingToManager(), log, maciInfo, mcehandler, retrieveClientInfo(), retrieveComponentInfo(), retrieveContainerInfo(), and alma::acs::commandcenter::meta::MaciInfo::setContents().
Referenced by getMaciInfo(), and alma::acs::commandcenter::meta::MaciSupervisor::RefreshIfNeeded::run().
| void alma::acs::commandcenter::meta::MaciSupervisor::refreshSoon | ( | ) | [inline] |
Request the MaciInfo be refreshed in the background.
References infoShouldBeRefreshed.
| ClientInfo [] alma::acs::commandcenter::meta::MaciSupervisor::retrieveClientInfo | ( | String | name_wildcard | ) | throws NotConnectedToManagerException, NoPermissionEx, SystemException [inline, protected] |
| NoPermissionEx | ||
| NotConnectedToManagerException | ||
| SystemException |
References si::ijs::maci::ManagerOperations::get_client_info(), myMaciHandle(), and myManagerReference().
Referenced by refreshNow().
| ComponentInfo [] alma::acs::commandcenter::meta::MaciSupervisor::retrieveComponentInfo | ( | String | name_wildcard | ) | throws NotConnectedToManagerException, NoPermissionEx, SystemException [inline, protected] |
| NoPermissionEx | ||
| NotConnectedToManagerException | ||
| SystemException |
References si::ijs::maci::ManagerOperations::get_component_info(), myMaciHandle(), and myManagerReference().
Referenced by refreshNow().
| ContainerInfo [] alma::acs::commandcenter::meta::MaciSupervisor::retrieveContainerInfo | ( | String | name_wildcard | ) | throws NotConnectedToManagerException, NoPermissionEx, SystemException [inline, protected] |
The containerHandles argument cannot be specified here. Reason: There's apparently a bug in Manager.get_activator_info() in ACS2.x (nothing known about ACS3.x): The containerHandles argument is not evaluated properly, instead empty (therefore useless) ContainerInfos are returned.
| name_wildcard | not verified to work as expected, recommended to use '*'. |
| NoPermissionEx | ||
| NotConnectedToManagerException | ||
| SystemException |
References si::ijs::maci::ManagerOperations::get_container_info(), myMaciHandle(), and myManagerReference().
Referenced by refreshNow().
| void alma::acs::commandcenter::meta::MaciSupervisor::setConnectsAutomatically | ( | boolean | b | ) | [inline] |
References connectsAutomatically.
Referenced by alma::acs::commandcenter::gui::DeploymentTree::getMaciSupervisor().
| void alma::acs::commandcenter::meta::MaciSupervisor::setRefreshesPeriodically | ( | boolean | b | ) | [inline] |
Refresh every once in a while, even if there wasn't any indication from the manager that something has changed.
References refreshCountdown, and refreshWithoutACause.
Referenced by alma::acs::commandcenter::app::CommandCenterLogic::DeploymentTreeControllerImpl::giveMaciSupervisor().
| synchronized void alma::acs::commandcenter::meta::MaciSupervisor::start | ( | ) | throws NoPermissionEx, CannotRetrieveManagerException, CorbaTransientException, CorbaNotExistException, UnknownErrorException [inline] |
This start implementation is smart, it can be called repeatedly.
| NoPermissionEx | ||
| CorbaTransientException | ||
| CorbaNotExistException | ||
| UnknownErrorException |
Implements alma::acs::commandcenter::meta::IMaciSupervisor.
References connectToManager(), alma::acs::commandcenter::meta::MaciSupervisor::ManagerConnectionExceptionHandler::handleExceptionTalkingToManager(), isConnected(), mcehandler, refreshTask, alma::acs::commandcenter::meta::MaciSupervisor::ManagerConnectionExceptionHandler::start(), and timer.
Referenced by alma::acs::commandcenter::gui::DeploymentTree::ManagerConnectionExceptionHandler::seemsManagerDoesNotExist(), alma::acs::commandcenter::gui::DeploymentTree::ManagerConnectionExceptionHandler::seemsManagerHasChangedOrHasCutConnection(), and alma::acs::commandcenter::gui::DeploymentTree::ManagerConnectionExceptionHandler::seemsWeHaveDisconnected().
| synchronized void alma::acs::commandcenter::meta::MaciSupervisor::stop | ( | ) | [inline] |
Tear down this instance.
Implements alma::acs::commandcenter::meta::IMaciSupervisor.
References disconnectFromManager(), mcehandler, refreshTask, and alma::acs::commandcenter::meta::MaciSupervisor::ManagerConnectionExceptionHandler::stop().
| String alma::acs::commandcenter::meta::MaciSupervisor::toString | ( | ) | [inline] |
Overridden to provide pretty description.
References managerLoc.
Instantiated in constructor. The retrieved descriptor will be stored in field administratorClientInfo.
Referenced by connectToManager(), and MaciSupervisor().
ClientInfo alma::acs::commandcenter::meta::MaciSupervisor::administratorClientInfo = null [protected] |
assigned in connectToManager(). unassigned in disconnectFromManager(). This means, this field indicates the "connected" status.
Referenced by connectToManager(), dismissManager(), isConnected(), and myMaciHandle().
boolean alma::acs::commandcenter::meta::MaciSupervisor::connectsAutomatically = true [protected] |
volatile boolean alma::acs::commandcenter::meta::MaciSupervisor::infoShouldBeRefreshed [protected] |
The 'refresh needed' flag used by the lazy-refresh timer task.
Referenced by alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::client_logged_in(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::client_logged_out(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::components_released(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::components_requested(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::container_logged_in(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::container_logged_out(), refreshSoon(), and alma::acs::commandcenter::meta::MaciSupervisor::RefreshIfNeeded::run().
Logger alma::acs::commandcenter::meta::MaciSupervisor::log = null [protected] |
Referenced by alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::authenticate(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::client_logged_in(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::client_logged_out(), alma::acs::commandcenter::meta::GuiMaciSupervisor::clientDisconnect(), alma::acs::commandcenter::meta::GuiMaciSupervisor::clientMessage(), alma::acs::commandcenter::meta::GuiMaciSupervisor::clientPing(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::component_activated(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::component_deactivated(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::components_available(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::components_released(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::components_requested(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::components_unavailable(), connectToManager(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::container_logged_in(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::container_logged_out(), alma::acs::commandcenter::meta::GuiMaciSupervisor::containerDisconnect(), alma::acs::commandcenter::meta::GuiMaciSupervisor::containerMessage(), alma::acs::commandcenter::meta::GuiMaciSupervisor::containerPing(), alma::acs::commandcenter::meta::GuiMaciSupervisor::containerShutdown(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::disconnect(), disconnectFromManager(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerForceReleaseComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponentNonSticky(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerLogout(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerPing(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerReleaseComponents(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerShutdown(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::message(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::name(), alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::ping(), refreshNow(), alma::acs::commandcenter::meta::MaciSupervisor::ManagerConnectionExceptionHandler::ConnectorThread::run(), and alma::acs::commandcenter::meta::MaciSupervisor::AdministratorImplementation::taggedmessage().
final MaciInfo alma::acs::commandcenter::meta::MaciSupervisor::maciInfo [protected] |
String alma::acs::commandcenter::meta::MaciSupervisor::managerLoc = null [protected] |
Referenced by connectToManager(), getManagerLocation(), and toString().
Manager alma::acs::commandcenter::meta::MaciSupervisor::managerRef = null [protected] |
assigned in connectToManager()
Referenced by connectToManager(), and myManagerReference().
ManagerConnectionExceptionHandler alma::acs::commandcenter::meta::MaciSupervisor::mcehandler [protected] |
Referenced by alma::acs::commandcenter::meta::GuiMaciSupervisor::managerForceReleaseComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponent(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerGetComponentNonSticky(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerLogout(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerPing(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerReleaseComponents(), alma::acs::commandcenter::meta::GuiMaciSupervisor::managerShutdown(), refreshNow(), start(), and stop().
String alma::acs::commandcenter::meta::MaciSupervisor::name = null [protected] |
Referenced by MaciSupervisor().
ORB alma::acs::commandcenter::meta::MaciSupervisor::orb = null [protected] |
Referenced by connectToManager(), and extractLocation().
volatile int alma::acs::commandcenter::meta::MaciSupervisor::refreshCountdown [protected] |
volatile boolean alma::acs::commandcenter::meta::MaciSupervisor::refreshWithoutACause [protected] |
Timer alma::acs::commandcenter::meta::MaciSupervisor::timer = new Timer("MaciSupervisor.Refresher", true) [protected] |
Referenced by start().
1.6.2