Classes | Public Member Functions | Protected Member Functions | Protected Attributes

alma.acs.commandcenter.meta.MaciSupervisor Class Reference

Inheritance diagram for alma.acs.commandcenter.meta.MaciSupervisor:
alma.acs.commandcenter.meta.IMaciSupervisor alma.acs.commandcenter.meta.GuiMaciSupervisor

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 
) [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 alma.acs.commandcenter.meta.MaciSupervisor.acImpl, alma.acs.commandcenter.meta.MaciSupervisor.createNode(), alma.acs.commandcenter.meta.MaciSupervisor.maciInfo, and alma.acs.commandcenter.meta.MaciSupervisor.name.


Member Function Documentation

SortingTreeNode alma.acs.commandcenter.meta.MaciSupervisor.createNode ( Object  info  )  [protected]
SortingTreeNode alma.acs.commandcenter.meta.MaciSupervisor.createNode ( Object  info,
boolean  allowInfoDetails 
) [protected]

Factory method, the boolean parameter supresses auto-generated sub-nodes

References alma.acs.commandcenter.meta.MaciSupervisor.createNode(), and alma.acs.commandcenter.meta.MaciSupervisor.extractLocation().

synchronized void alma.acs.commandcenter.meta.MaciSupervisor.dismissManager (  ) 

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 alma.acs.commandcenter.meta.MaciSupervisor.administratorClientInfo.

Referenced by alma.acs.commandcenter.meta.MaciSupervisor.disconnectFromManager(), and alma.acs.commandcenter.gui.DeploymentTree.removeManager().

String alma.acs.commandcenter.meta.MaciSupervisor.extractLocation ( org.omg.CORBA.Object  reference  )  [protected]

Helper for createNode()

Returns:
{host, port}, or null on failure

References alma.acs.commandcenter.meta.MaciSupervisor.orb.

Referenced by alma.acs.commandcenter.meta.MaciSupervisor.createNode().

MaciInfo alma.acs.commandcenter.meta.MaciSupervisor.getMaciInfo (  )  throws NoPermissionEx, NotConnectedToManagerException, CorbaTransientException, CorbaNotExistException, UnknownErrorException

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 alma.acs.commandcenter.meta.MaciSupervisor.maciInfo, and alma.acs.commandcenter.meta.MaciSupervisor.refreshNow().

Referenced by alma.acs.commandcenter.gui.DeploymentTree.shieldedRefreshManager().

MaciInfo alma.acs.commandcenter.meta.MaciSupervisor.getMaciInformation (  ) 

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 alma.acs.commandcenter.meta.MaciSupervisor.maciInfo.

void alma.acs.commandcenter.meta.MaciSupervisor.refreshNow (  )  throws NoPermissionEx, NotConnectedToManagerException, SystemException, CorbaTransientException, CorbaNotExistException, UnknownErrorException

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 alma.acs.commandcenter.meta.MaciSupervisor.createNode(), alma.acs.commandcenter.meta.MaciSupervisor.ManagerConnectionExceptionHandler.handleExceptionTalkingToManager(), alma.acs.commandcenter.meta.MaciSupervisor.log, alma.acs.commandcenter.meta.MaciSupervisor.maciInfo, alma.acs.commandcenter.meta.MaciSupervisor.mcehandler, alma.acs.commandcenter.meta.MaciSupervisor.retrieveClientInfo(), alma.acs.commandcenter.meta.MaciSupervisor.retrieveComponentInfo(), alma.acs.commandcenter.meta.MaciSupervisor.retrieveContainerInfo(), and alma.acs.commandcenter.meta.MaciInfo.setContents().

Referenced by alma.acs.commandcenter.meta.MaciSupervisor.getMaciInfo(), and alma.acs.commandcenter.meta.MaciSupervisor.RefreshIfNeeded.run().

void alma.acs.commandcenter.meta.MaciSupervisor.refreshSoon (  ) 

Request the MaciInfo be refreshed in the background.

References alma.acs.commandcenter.meta.MaciSupervisor.infoShouldBeRefreshed.

ClientInfo [] alma.acs.commandcenter.meta.MaciSupervisor.retrieveClientInfo ( String  name_wildcard  )  throws NotConnectedToManagerException, NoPermissionEx, SystemException [protected]
ComponentInfo [] alma.acs.commandcenter.meta.MaciSupervisor.retrieveComponentInfo ( String  name_wildcard  )  throws NotConnectedToManagerException, NoPermissionEx, SystemException [protected]
ContainerInfo [] alma.acs.commandcenter.meta.MaciSupervisor.retrieveContainerInfo ( String  name_wildcard  )  throws NotConnectedToManagerException, NoPermissionEx, SystemException [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 alma.acs.commandcenter.meta.MaciSupervisor.myMaciHandle(), and alma.acs.commandcenter.meta.MaciSupervisor.myManagerReference().

Referenced by alma.acs.commandcenter.meta.MaciSupervisor.refreshNow().

void alma.acs.commandcenter.meta.MaciSupervisor.setConnectsAutomatically ( boolean  b  ) 
void alma.acs.commandcenter.meta.MaciSupervisor.setRefreshesPeriodically ( boolean  b  ) 

Refresh every once in a while, even if there wasn't any indication from the manager that something has changed.

References alma.acs.commandcenter.meta.MaciSupervisor.refreshCountdown, and alma.acs.commandcenter.meta.MaciSupervisor.refreshWithoutACause.

Referenced by alma.acs.commandcenter.app.CommandCenterLogic.DeploymentTreeControllerImpl.giveMaciSupervisor().

synchronized void alma.acs.commandcenter.meta.MaciSupervisor.start (  )  throws NoPermissionEx, CannotRetrieveManagerException, CorbaTransientException, CorbaNotExistException, UnknownErrorException
String alma.acs.commandcenter.meta.MaciSupervisor.toString (  ) 

Overridden to provide pretty description.

References alma.acs.commandcenter.meta.MaciSupervisor.managerLoc.


Member Data Documentation

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

Referenced by alma.acs.commandcenter.meta.MaciSupervisor.connectToManager(), and alma.acs.commandcenter.meta.MaciSupervisor.MaciSupervisor().

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(), alma.acs.commandcenter.meta.MaciSupervisor.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(), alma.acs.commandcenter.meta.MaciSupervisor.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(), alma.acs.commandcenter.meta.MaciSupervisor.refreshNow(), alma.acs.commandcenter.meta.MaciSupervisor.ManagerConnectionExceptionHandler.ConnectorThread.run(), and alma.acs.commandcenter.meta.MaciSupervisor.AdministratorImplementation.taggedmessage().

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

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties