alma::acs::commandcenter::meta::MaciSupervisor Class Reference

Inheritance diagram for alma::acs::commandcenter::meta::MaciSupervisor:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::commandcenter::meta::MaciSupervisor:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Author:
mschilli

Constructor & Destructor Documentation

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.

Parameters:
clientName name-prefix like "AcsCommandCenter" or "OMC"
managerLoc the manager corbaloc
orb the orb to use

References acImpl, createNode(), maciInfo, and name.


Member Function Documentation

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]
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()

Returns:
{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.

Returns:
a stable maciInfo instance, never null
Exceptions:
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.

Returns:
a stable maciInfo instance, never null

References maciInfo.

String alma::acs::commandcenter::meta::MaciSupervisor::getManagerLocation (  )  [inline]
boolean alma::acs::commandcenter::meta::MaciSupervisor::isConnected (  )  [inline]
int alma::acs::commandcenter::meta::MaciSupervisor::myMaciHandle (  )  throws NotConnectedToManagerException [inline]
Manager alma::acs::commandcenter::meta::MaciSupervisor::myManagerReference (  )  throws NotConnectedToManagerException [inline, protected]
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.

Exceptions:
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]
Exceptions:
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]
Exceptions:
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.

Parameters:
name_wildcard not verified to work as expected, recommended to use '*'.
Returns:
Exceptions:
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]
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]
synchronized void alma::acs::commandcenter::meta::MaciSupervisor::stop (  )  [inline]
String alma::acs::commandcenter::meta::MaciSupervisor::toString (  )  [inline]

Overridden to provide pretty description.

References managerLoc.


Member Data Documentation

Instantiated in constructor. The retrieved descriptor will be stored in field administratorClientInfo.

Referenced by connectToManager(), and MaciSupervisor().

assigned in connectToManager(). unassigned in disconnectFromManager(). This means, this field indicates the "connected" status.

Referenced by connectToManager(), dismissManager(), isConnected(), and myMaciHandle().

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().

Referenced by MaciSupervisor().

Referenced by start(), and stop().

Timer alma::acs::commandcenter::meta::MaciSupervisor::timer = new Timer("MaciSupervisor.Refresher", true) [protected]

Referenced by start().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2