com::cosylab::acs::maci::manager::ManagerImpl Class Reference

Inheritance diagram for com::cosylab::acs::maci::manager::ManagerImpl:
Inheritance graph
[legend]
Collaboration diagram for com::cosylab::acs::maci::manager::ManagerImpl:
Collaboration graph
[legend]

List of all members.

Classes

class  ClientMessageTask
class  DeactivateComponentTask
class  HandleMonitorEntry
class  ReferenceCountingLock
class  ReleaseComponentTask
class  RequestComponentTask
class  ServiceComponent
class  ShutdownContainerTask

Public Types

enum  WhyUnloadedReason { REMOVED, TIMEOUT, DISAPPEARED, REPLACED }

Public Member Functions

void initialize (Prevayler prevayler, CDBAccess cdbAccess, Context context, Logger logger, ManagerContainerServices managerContainerServices)
void initializationDone ()
int getHandle ()
void setDomain (String domain)
String getDomain ()
ContainerInfo[] getContainerInfo (int id, int[] handles, String name_wc) throws AcsJNoPermissionEx
ClientInfo[] getClientInfo (int id, int[] handles, String name_wc) throws AcsJNoPermissionEx
ComponentInfo[] getComponentInfo (int id, int[] handles, String name_wc, String type_wc, boolean activeOnly) throws AcsJNoPermissionEx
Component getService (int id, URI curl, boolean activate, StatusHolder status) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
Component getComponent (int id, URI curl, boolean activate, StatusHolder status) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
Component getComponentNonSticky (int id, URI curl) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
void makeComponentImmortal (int id, URI curl, boolean immortalState) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJBadParameterEx
ClientInfo login (Client reference) throws AcsJNoPermissionEx
void logout (int id) throws AcsJNoPermissionEx
void logout (int id, boolean pingFailed) throws AcsJNoPermissionEx
int registerComponent (int id, URI curl, String type, Component component) throws AcsJNoPermissionEx, AcsJBadParameterEx
void unregisterComponent (int id, int h) throws AcsJNoPermissionEx, AcsJBadParameterEx
Component restartComponent (int id, URI curl) throws AcsJNoPermissionEx, AcsJBadParameterEx
int releaseComponent (int id, URI curl) throws AcsJNoPermissionEx, AcsJBadParameterEx
int forceReleaseComponent (int id, URI curl) throws AcsJNoPermissionEx, AcsJBadParameterEx
void releaseComponents (int id, URI[] curls) throws AcsJNoPermissionEx
void shutdownContainer (int id, String containerName, int action) throws AcsJNoPermissionEx
void shutdown (int id, int containers) throws AcsJNoPermissionEx
ClientInfo getClientInfo (int id)
ComponentInfo getComponentInfo (int id)
ComponentInfo getDefaultComponent (int id, String type) throws AcsJNoPermissionEx, NoDefaultComponentException
ComponentInfo getDynamicComponent (int id, ComponentSpec componentSpec, boolean markAsDefault) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
ComponentInfo[] getDynamicComponents (int id, ComponentSpec[] components) throws AcsJNoPermissionEx
ComponentInfo getCollocatedComponent (int id, ComponentSpec componentSpec, boolean markAsDefault, URI targetComponentURI) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
boolean isServiceComponent (String name)
void initializeFederation (Hashtable federationDirectoryProperties) throws CoreException
String toString ()
void reportPrevaylerState (final boolean raise, Throwable alarmEx)
HandleDataStore getContainers ()
HandleDataStore getAdministrators ()
HandleDataStore getClients ()
HandleDataStore getComponents ()
void logHandleRelease (int handle, WhyUnloadedReason reason)
HandleMonitorEntry getHandleReleaseLog (int handle)
Map getUnavailableComponents ()
Map getDefaultComponents ()
Context getRemoteDirectory ()
void setTransport (Transport transport)
void setRemoteDirectory (Context remoteDirectory)
Object getManagerComponentReference ()
Object getRemoteDirectoryComponentReference ()
void setManagerComponentReference (Object managerComponentReference)
void setRemoteDirectoryComponentReference (Object remoteDirectoryComponentReference)
boolean isShuttingDown ()
ManagerShutdown getShutdownImplementation ()
void setShutdownImplementation (ManagerShutdown shutdownImplementation)
long getLockTimeout ()
void setLockTimeout (long l)
void setCDBAccess (CDBAccess cdbAccess)
HashSet getActiveAlarms ()
boolean hasActiveAlarm (String faultMember)
void alarmRaised (String faultMember)
void alarmCleared (String faultMember)

Protected Member Functions

synchronized long generateExecutionId ()

Protected Attributes

transient Map< Client,
LinkedList< ClientMessageTask > > 
clientMessageQueue

Static Protected Attributes

static final String FAULT_FAMILY = "Manager"
static final String FAULT_MEMBER = "Prevayler"
static final int FAULT_CODE = 2

Private Member Functions

void reportException (Throwable th)
void initializeDefaultConfiguration ()
void initializePingTasks ()
void checkLoadBalancingStrategy ()
Component getComponent (int id, URI curl, boolean activate, StatusHolder status, boolean allowServices) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx
void checkContainerShutdownState (ContainerInfo containerInfo) throws NoResourcesException
void releaseComponents (ComponentInfo[] infos) throws AcsJNoPermissionEx
ClientInfo containerLogin (String name, AuthenticationData reply, Container container, long timeStamp, long executionId) throws AcsJNoPermissionEx
void containerPostLoginActivation (final ContainerInfo containerInfo, boolean recoverContainer)
void containerInternalStateMerge (ContainerInfo containerInfo, boolean recoverContainer) throws AcsJNoPermissionEx
void initializeServiceDaemons ()
void autoStartComponents ()
boolean hasCDBEntry (ComponentInfo componentInfo)
ClientInfo administratorLogin (String name, AuthenticationData reply, Administrator administrator, long timeStamp, long executionId) throws AcsJNoPermissionEx
ClientInfo clientLogin (String name, AuthenticationData reply, Client client, long timeStamp, long executionId) throws AcsJNoPermissionEx
void containerLogout (int id, boolean pingFailed)
void makeUnavailable (ComponentInfo componentInfo)
void clientLogout (int id, boolean pingFailed)
void administratorLogout (int id, boolean pingFailed)
ClientInfo[] getAdministrators (int excludeHandle)
ContainerInfo[] getContainersInfo ()
ClientInfo[] getClientInfo ()
ClientInfo[] getClients (int excludeHandle, int[] handles)
void removeComponentOwner (int componentHandle, int owner)
void addComponentOwner (int componentHandle, int owner)
void notifyClientLogin (final ClientInfo clientInfo, final long timeStamp, final long executionId)
void notifyContainerLogin (final ContainerInfo containerInfo, final long timeStamp, final long executionId)
void notifyClientLogout (final ClientInfo clientInfo, final long timeStamp)
void notifyContainerLogout (final ContainerInfo containerInfo, final long timeStamp)
void notifyContainerDisconnectShutdown (int code)
void notifyContainerShutdownOrder (ContainerInfo containerInfo, int[] handles)
void notifyClientDisconnectShutdown ()
void notifyComponentRequested (int[] requestors, int[] components, final long timeStamp)
void notifyComponentActivated (final ComponentInfo componentInfo, final long timeStamp, final long executionId)
void notifyComponentDeactivated (final int handle, final long timeStamp)
void notifyComponentReleased (int[] requestors, int[] components, final long timeStamp)
void notifyComponentAvailable (int excludeClient, int[] clientHandles, ComponentInfo[] info)
void notifyComponentUnavailable (int excludeClient, int[] clientHandles, String[] names)
void sendMessage (Client client, String message, MessageType messageType)
void sendMessage (Client client, String message, MessageType messageType, short messageID)
void securityCheck (int id, int requiredRights) throws AcsJNoPermissionEx
ContainerInfo getContainerInfo (int id)
ContainerInfo getContainerInfo (String name)
Component internalRequestComponent (int requestor, URI curl, StatusHolder status) throws AcsJCannotGetComponentEx
Component internalRequestComponent (int requestor, URI curl, StatusHolder status, boolean activate) throws AcsJCannotGetComponentEx
ArrayList doCycleCheck (int requestor, int requested)
void checkCyclicDependency (int requestor, String requestedComponentName) throws AcsJCyclicDependencyDetectedEx
ComponentInfo internalRequestComponent (int requestor, String name, String type, String code, String containerName, int keepAliveTime, StatusHolder status, boolean activate) throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
ComponentInfo internalNoSyncRequestComponent (int requestor, String name, String type, String code, String containerName, int keepAliveTime, StatusHolder status, boolean activate) throws AcsJCannotGetComponentEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
int internalReleaseComponent (int owner, URI curl, boolean force) throws AcsJNoPermissionEx, AcsJBadParameterEx
void internalDeactivateComponent (String name)
int internalReleaseComponent (int owner, int h, boolean force) throws AcsJNoPermissionEx, AcsJBadParameterEx
int internalNoSyncReleaseComponent (int owner, int h, boolean force) throws AcsJNoPermissionEx
void internalNoSyncDeactivateComponent (ComponentInfo componentInfo)
ContainerInfo startUpContainer (String containerName)
ContainerInfo internalNoSyncStartUpContainer (String containerName)
void conditionalShutdownContainer (ContainerInfo containerInfo)
Component internalRestartComponent (int owner, URI curl) throws AcsJNoPermissionEx
Component internalRestartComponent (int owner, int h) throws AcsJNoPermissionEx
Component internalNoSyncRestartComponent (int owner, int h) throws AcsJNoPermissionEx
ComponentInfo internalRequestDefaultComponent (int requestor, String type) throws NoDefaultComponentException
String[] searchDynamicComponent (String[] fieldNames, String[] requiredValues, boolean[] equalityRequired, int[] equalityPoints, IntHolder keepAliveTimeHolder)
ComponentInfo internalRequestDynamicComponent (int requestor, ComponentSpec componentSpec) throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx
void bind (String name, String type, Object object)
void bind (Context remoteDirectory, String name, String type, Object object)
void rebind (Context remoteDirectory, String name, String type, Object object)
Object lookup (String name, String type)
Object lookup (Context remoteDirectory, String name, String type)
void unbind (String name, String type)
void unbind (Context remoteDirectory, String name, String type)
void cleanupEmptyFContext (Context remoteDirectory, String name)
String getRequestorName (int id)
void checkCURL (URI curl) throws AcsJBadParameterEx
void checkCURL (URI curl, boolean allowNonLocalDomains) throws AcsJBadParameterEx
boolean isLocalDomainCURL (URI curl)
String extractName (URI curl)
boolean acquireSynchronizationObject (String name, long msec)
void releaseSynchronizationObject (String name)
void releaseSynchronizationObject (String name, boolean release)
synchronized DAOProxy getManagerDAOProxy ()
void readManagerConfiguration ()
synchronized void destroyManagerDAOProxy ()
synchronized DAOProxy getComponentsDAOProxy ()
String[] getComponentsList ()
String[] refreshComponentsList (DAOProxy dc)
synchronized void destroyComponetsDAOProxy ()
synchronized DAOProxy getContainersDAOProxy ()
synchronized void destroyContainersDAOProxy ()
DAOProxy createDAO (String entity)
String readStringCharacteristics (DAOProxy dao, String path)
String readStringCharacteristics (DAOProxy dao, String path, boolean silent)
int readLongCharacteristics (DAOProxy dao, String path, int defaultValue, boolean silent)
double readDoubleCharacteristics (DAOProxy dao, String path, double defaultValue, boolean silent)
void destroyDAO (DAOProxy dao)
synchronized Manager getManagerForDomain (String domainName)
void finalizeFederation ()
Serializable executeCommand (Command command) throws NoResourcesException

Static Private Member Functions

static String dottedToHierarchical (String dottedName)
static String convertToHiearachical (String componentName)

Private Attributes

String domain = DEFAULT_DOMAIN
int handle = MANAGER_MASK
HandleDataStore clients = new HandleDataStore(16, HANDLE_MASK)
HandleDataStore administrators = new HandleDataStore(16, HANDLE_MASK)
HandleDataStore containers = new HandleDataStore(32, HANDLE_MASK)
HandleDataStore components = new HandleDataStore(128, HANDLE_MASK)
Map releasedHandles = new HashMap()
Map unavailableComponents = new HashMap()
transient Map pendingActivations = null
transient Set pendingContainerShutdown = null
transient Object containerLoggedInMonitor = null
Map defaultComponents = new HashMap()
transient Random random = null
transient Timer heartbeatTask = null
transient Timer delayedDeactivationTask = null
transient Context remoteDirectory = null
transient Object managerComponentReference = null
transient Object remoteDirectoryComponentReference = null
transient Map activationSynchronization
transient
ReaderPreferenceReadWriteLock 
activationPendingRWLock
transient AtomicBoolean shutdown
transient ThreadPoolExecutor threadPool
transient int poolThreads
transient long lockTimeout
transient int clientPingInterval
transient int administratorPingInterval
transient int containerPingInterval
transient ManagerShutdown shutdownImplementation = null
transient CDBAccess cdbAccess = null
transient DAOProxy managerDAO = null
transient DAOProxy componentsDAO = null
transient DAOProxy containersDAO = null
transient String[] componentListCache = null
transient ComponentSpec cdbActivation = null
transient LoadBalancingStrategy loadBalancingStrategy = null
transient boolean enableHandleMonitoring
transient boolean federationEnabled = false
transient Context federationDirectory = null
HashSet domains = new HashSet()
transient Map managerCache = null
transient Prevayler prevayler = null
transient Transport transport = null
transient
ComponentInfoTopologicalSortManager 
topologySortManager
transient Logger logger
transient ACSAlarmSystemInterface alarmSource
HashSet activeAlarms = new HashSet()
transient long lastExecutionId = 0
transient volatile AtomicBoolean prevaylerAlarmState
volatile int originalId = MANAGER_MASK
volatile int originalContainers = 0

Static Private Attributes

static final long serialVersionUID = 1372046383416324709L
static final ObjectStreamField[] serialPersistentFields
static final int INTERDOMAIN_MANAGER_HANDLE = 0x05555555
static final String DEFAULT_DOMAIN = ""
static final int CONTAINER_RIGHTS = AccessRights.NONE
static final String NAME_CDB_COMPONENTSPEC = "ACS.CDBComponentSpec"
static final String NAME_LOAD_BALANCING_STRATEGY = "ACS.LoadBalancingStrategy"
static final String NAME_CDB_DISABLE = "ACS.disableCDB"
static final String NAME_HANDLE_MONITORING = "manager.debug.rememberOldHandles"
static final String CURL_URI_SCHEMA = "curl://"
static final String NAME_DOMAIN_LIST = "ACS.domains"
static final String NAME_DOMAIN_DIRECTORY = "ACS.federationDirectory"
static transient SimpleDateFormat timeFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")

Detailed Description

This class is an implementation of MACI com.cosylab.acs.maci.Manager. It provides the actual internal implementation of the Manager functionality in a way independent from the ACS maci Manager IDL interface.

Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@
See also:
Manager

Member Enumeration Documentation

Enumerator:
REMOVED 
TIMEOUT 
DISAPPEARED 
REPLACED 

Member Function Documentation

boolean com::cosylab::acs::maci::manager::ManagerImpl::acquireSynchronizationObject ( String  name,
long  msec 
) [inline, private]

Acquire synchronization lock for named object.

Parameters:
name name of the object whose lock to acquire.
msecs the number of milleseconds to wait. An argument less than or equal to zero means not to wait at all.
Returns:
true if acquired, false othwerwise.

References com::cosylab::acs::maci::manager::ManagerImpl::ReferenceCountingLock::acquire(), activationSynchronization, com::cosylab::acs::maci::manager::ManagerImpl::ReferenceCountingLock::increment(), and releaseSynchronizationObject().

Referenced by internalDeactivateComponent(), internalReleaseComponent(), internalRequestComponent(), internalRestartComponent(), and startUpContainer().

void com::cosylab::acs::maci::manager::ManagerImpl::addComponentOwner ( int  componentHandle,
int  owner 
) [inline, private]
ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::administratorLogin ( String  name,
AuthenticationData  reply,
Administrator  administrator,
long  timeStamp,
long  executionId 
) throws AcsJNoPermissionEx [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::administratorLogout ( int  id,
boolean  pingFailed 
) [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::alarmCleared ( String  faultMember  )  [inline]

Remember that alarms has been cleared.

References activeAlarms, and executeCommand().

Referenced by com::cosylab::acs::maci::manager::PingTimerTask::send_alarm().

void com::cosylab::acs::maci::manager::ManagerImpl::alarmRaised ( String  faultMember  )  [inline]

Remember that alarms has been raised.

References activeAlarms, and executeCommand().

Referenced by com::cosylab::acs::maci::manager::PingTimerTask::send_alarm().

void com::cosylab::acs::maci::manager::ManagerImpl::autoStartComponents (  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::bind ( Context  remoteDirectory,
String  name,
String  type,
Object  object 
) [inline, private]

Bind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
object object to be binded

Todo:
temp. commented out
Todo:
temp. commented out

References bind(), CURL_URI_SCHEMA, logger, and rebind().

void com::cosylab::acs::maci::manager::ManagerImpl::bind ( String  name,
String  type,
Object  object 
) [inline, private]

Bind object to root of remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
name name of the object, code non-null
object object to be binded

References remoteDirectory.

Referenced by bind(), initializeFederation(), internalNoSyncRequestComponent(), registerComponent(), and setManagerComponentReference().

void com::cosylab::acs::maci::manager::ManagerImpl::checkContainerShutdownState ( ContainerInfo  containerInfo  )  throws NoResourcesException [inline, private]

Checks if container's state (e.g. not in shutdown state).

Parameters:
containerInfo container's info to be checked.

References pendingContainerShutdown.

Referenced by internalNoSyncRequestComponent(), and internalNoSyncRestartComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::checkCURL ( URI  curl,
boolean  allowNonLocalDomains 
) throws AcsJBadParameterEx [inline, private]

Verifies URI if it is valid, in CURL format; also checks if it belongs to this domain. If URI is not valid, BadParametersException exception is thrown.

Parameters:
uri uri to be check to be a valid curl
allowNonLocalDomains allow non-local domains

References CURL_URI_SCHEMA, domain, domains, isLocalDomainCURL(), alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameter(), and alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameterValue().

void com::cosylab::acs::maci::manager::ManagerImpl::checkCURL ( URI  curl  )  throws AcsJBadParameterEx [inline, private]

Verifies URI if it is valid, in CURL format; also checks if it belongs to this domain. If URI is not valid, BadParametersException exception is thrown. Allows non-local domains.

Parameters:
uri uri to be check to be a valid curl

Referenced by containerPostLoginActivation(), forceReleaseComponent(), getComponent(), getComponentNonSticky(), makeComponentImmortal(), registerComponent(), releaseComponent(), and restartComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::checkCyclicDependency ( int  requestor,
String  requestedComponentName 
) throws AcsJCyclicDependencyDetectedEx [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::checkLoadBalancingStrategy (  )  [inline, private]

Checks and registers load balancing strategy. Load balancing strategy is defined as Java JVM system property named NAME_LOAD_BALANCING_STRATEGY contaning class name of the LoadBalancingStrategy implementation.

References loadBalancingStrategy, logger, and NAME_LOAD_BALANCING_STRATEGY.

Referenced by initialize().

void com::cosylab::acs::maci::manager::ManagerImpl::cleanupEmptyFContext ( Context  remoteDirectory,
String  name 
) [inline, private]

Removes empty ".F" context(s) (recirsive).

Parameters:
remoteDirectory directory root.
name name of the child object being just removed from the potential empty parent context.

References logger.

Referenced by unbind().

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::clientLogin ( String  name,
AuthenticationData  reply,
Client  client,
long  timeStamp,
long  executionId 
) throws AcsJNoPermissionEx [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::clientLogout ( int  id,
boolean  pingFailed 
) [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::conditionalShutdownContainer ( ContainerInfo  containerInfo  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::containerInternalStateMerge ( ContainerInfo  containerInfo,
boolean  recoverContainer 
) throws AcsJNoPermissionEx [inline, private]

Retrieve container's internal state and merge it with manager's. NOTE: this method should not be run in separate thread since states should be merged synchronously. Merge is split to two parts:

Container -> Manager

If container component handle is also allocated in manager state and components information match, then we have a perfect fit and no action is required. If they do not match, container is rejected. If container component handle is not allocated in the manager state and no component with same name is found in manager state, component information is transferred to the manager, owtherwise container is rejected.

NOTE: The second option allows components without owners to be activated.

NOTE: Container is rejected due to its state inconsistency which will probably cause problems in the future. Container has to be restarted.
(A more sophisticated algorithm could give manager "the power to shape up" container state.)

NOTE: Container -> Manager has to work in the way transactions do, i.e. in case of rejection manager state should no be affected.

Manager -> Container

If recoverContainer is true, all components known to the manager to be activated on this particular container and listed as activated by the container will be marked as unavailable to be reactivated later by containerPostLoginActivation method. If recoverContainer is false, all there information will be discared (components removed from container component list, deallocated, and removed from their owners list).

Parameters:
containerInfo container info for which to perform merge, non-null.
recoverContainer if true manager state will be 'transferred' to container.

References clients, com::cosylab::acs::maci::HandleConstants::COMPONENT_MASK, components, executeCommand(), com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::IntArray::get(), com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ComponentInfo::getClients(), com::cosylab::acs::maci::ComponentInfo::getCode(), getComponent(), com::cosylab::acs::maci::ComponentInfo::getComponent(), com::cosylab::acs::maci::ComponentInfo::getContainer(), com::cosylab::acs::maci::ComponentInfo::getHandle(), getHandle(), com::cosylab::acs::maci::ComponentInfo::getInterfaces(), com::cosylab::acs::maci::ComponentInfo::getName(), com::cosylab::acs::maci::ComponentInfo::getType(), handle, com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, hasCDBEntry(), com::cosylab::acs::maci::manager::HandleDataStore::isAllocated(), logger, makeUnavailable(), com::cosylab::acs::maci::manager::HandleDataStore::next(), notifyComponentAvailable(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::notifyTopologyChange(), com::cosylab::acs::maci::IntArray::remove(), removeComponentOwner(), com::cosylab::acs::maci::ComponentInfo::setAccessRights(), com::cosylab::acs::maci::ComponentInfo::setComponent(), com::cosylab::acs::maci::ComponentInfo::setContainer(), com::cosylab::acs::maci::ComponentInfo::setContainerName(), com::cosylab::acs::maci::ComponentInfo::setDynamic(), com::cosylab::acs::maci::ComponentInfo::setDynamicContainerName(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setID(), com::cosylab::acs::maci::ComponentInfo::setInterfaces(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setProtectedResource(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setReason(), com::cosylab::acs::maci::IntArray::size(), com::cosylab::acs::maci::IntArray::toArray(), topologySortManager, and unavailableComponents.

Referenced by containerLogin().

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::containerLogin ( String  name,
AuthenticationData  reply,
Container  container,
long  timeStamp,
long  executionId 
) throws AcsJNoPermissionEx [inline, private]

Container specific login method.

Parameters:
name name of the container, non-null.
reply reply to authenticate method, non-null.
container container that is logging in, non-null.
Returns:
ClientInfo client info. of newly logged container

References alarmSource, com::cosylab::acs::maci::HandleConstants::CONTAINER_MASK, containerInternalStateMerge(), containerPingInterval, containerPostLoginActivation(), containers, com::cosylab::acs::maci::manager::TimerTaskContainerInfo::createClientInfo(), executeCommand(), com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ContainerInfo::getContainer(), getContainersDAOProxy(), com::cosylab::acs::maci::ContainerInfo::getHandle(), com::cosylab::acs::maci::ContainerInfo::getName(), com::cosylab::acs::maci::ContainerInfo::getPingInterval(), com::cosylab::acs::maci::Client::getRemoteLocation(), handle, heartbeatTask, logger, com::cosylab::acs::maci::manager::HandleDataStore::next(), notifyContainerLogin(), com::cosylab::acs::maci::Client::ping(), random, readLongCharacteristics(), readStringCharacteristics(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setID(), com::cosylab::acs::maci::ContainerInfo::setImplLang(), com::cosylab::acs::maci::ContainerInfo::setPingInterval(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setProtectedResource(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setReason(), com::cosylab::acs::maci::manager::TimerTaskContainerInfo::setTask(), and threadPool.

Referenced by login().

void com::cosylab::acs::maci::manager::ManagerImpl::containerLogout ( int  id,
boolean  pingFailed 
) [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::containerPostLoginActivation ( final ContainerInfo  containerInfo,
boolean  recoverContainer 
) [inline, private]

Container post login activation, activate startup and unavailable components. NOTE: to be run in separate thread.

Parameters:
containerInfo container info for which to perform post login activation.
recoverContainer recovery mode flag.

References cdbActivation, checkCURL(), com::cosylab::acs::maci::ComponentStatus::COMPONENT_ACTIVATED, components, componentsDAO, containerLoggedInMonitor, com::cosylab::acs::maci::IntArray::contains(), convertToHiearachical(), executeCommand(), extractName(), com::cosylab::cdb::client::DAOProxy::get_field_data(), com::cosylab::cdb::client::DAOProxy::get_string_seq(), com::cosylab::acs::maci::ComponentInfo::getClients(), com::cosylab::acs::maci::ComponentSpec::getCode(), com::cosylab::acs::maci::ComponentInfo::getComponent(), com::cosylab::acs::maci::ContainerInfo::getComponents(), getComponentsDAOProxy(), getComponentsList(), com::cosylab::acs::maci::ContainerInfo::getContainer(), com::cosylab::acs::maci::ComponentSpec::getContainer(), com::cosylab::acs::maci::ComponentInfo::getDynamicContainerName(), com::cosylab::acs::maci::ContainerInfo::getHandle(), com::cosylab::acs::maci::ComponentInfo::getHandle(), getHandle(), com::cosylab::acs::maci::ContainerInfo::getImplLang(), getManagerDAOProxy(), com::cosylab::acs::maci::ComponentInfo::getName(), com::cosylab::acs::maci::ComponentSpec::getName(), com::cosylab::acs::maci::ContainerInfo::getName(), com::cosylab::acs::maci::StatusHolder::getStatus(), com::cosylab::acs::maci::ComponentSpec::getType(), com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, internalRequestComponent(), com::cosylab::acs::maci::ComponentInfo::isDynamic, isShuttingDown(), logger, readStringCharacteristics(), com::cosylab::acs::maci::ManagerConstants::RELEASE_IMMEDIATELY, removeComponentOwner(), reportException(), sendMessage(), com::cosylab::acs::maci::IntArray::toArray(), unavailableComponents, and unbind().

Referenced by containerLogin().

static String com::cosylab::acs::maci::manager::ManagerImpl::convertToHiearachical ( String  componentName  )  [inline, static, private]

Converts component name (e.g. "TOWER1/DOOR1") to hierachical name (e.g. "TOWER1.F/DOOR").

Parameters:
component name component name to be converted.
Returns:
hierarchical name.

Referenced by containerPostLoginActivation(), internalNoSyncDeactivateComponent(), internalNoSyncRequestComponent(), and registerComponent().

DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::createDAO ( String  entity  )  [inline, private]

Creates DAO (CDB access) for requested entity.

Parameters:
name name of the entity, non-null.
Returns:
DAOProxy DAO (CDB access) for requested entity, null on failure.

References cdbAccess, com::cosylab::cdb::client::CDBAccess::createDAO(), and logger.

Referenced by getComponentsDAOProxy(), getContainersDAOProxy(), and getManagerDAOProxy().

synchronized void com::cosylab::acs::maci::manager::ManagerImpl::destroyComponetsDAOProxy (  )  [inline, private]

Destroys components DAO (CDB access).

References componentsDAO, and destroyDAO().

Referenced by setCDBAccess(), and shutdown().

synchronized void com::cosylab::acs::maci::manager::ManagerImpl::destroyContainersDAOProxy (  )  [inline, private]

Destroys containers DAO (CDB access).

References containersDAO, and destroyDAO().

Referenced by shutdown().

void com::cosylab::acs::maci::manager::ManagerImpl::destroyDAO ( DAOProxy  dao  )  [inline, private]

Destroys DAO (CDB access).

Parameters:
dao DAO to be destroyed.

References com::cosylab::cdb::client::DAOProxy::destroy(), and logger.

Referenced by destroyComponetsDAOProxy(), destroyContainersDAOProxy(), and destroyManagerDAOProxy().

synchronized void com::cosylab::acs::maci::manager::ManagerImpl::destroyManagerDAOProxy (  )  [inline, private]

Destroys Manager DAO (CDB access).

References destroyDAO(), and managerDAO.

Referenced by setCDBAccess(), and shutdown().

ArrayList com::cosylab::acs::maci::manager::ManagerImpl::doCycleCheck ( int  requestor,
int  requested 
) [inline, private]

Check for cyclic dependency between components, if detected path is returned.

Parameters:
requestor handle of requestor component
requested handle of requested component
Returns:
if cycle is detected then path is returned, otherwise null

References components, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ComponentInfo::getComponents(), com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, and com::cosylab::acs::maci::IntArray::toArray().

Referenced by checkCyclicDependency().

static String com::cosylab::acs::maci::manager::ManagerImpl::dottedToHierarchical ( String  dottedName  )  [inline, static, private]

Converts dotted name (e.g. "te1.hq.eso.org") to hierachical name (e.g. "org.D/eso.D/hq.D/te1.D").

Parameters:
dottedName dotted name to be converted.
Returns:
hierarchical name.

Referenced by finalizeFederation(), getManagerForDomain(), and initializeFederation().

Serializable com::cosylab::acs::maci::manager::ManagerImpl::executeCommand ( Command  command  )  throws NoResourcesException [inline, private]
String com::cosylab::acs::maci::manager::ManagerImpl::extractName ( URI  curl  )  [inline, private]

Extract component name from the URI. Only name is returned for local domain, full CURL string for non-local domains.

Parameters:
curl curl from which to extract name.

References isLocalDomainCURL().

Referenced by containerPostLoginActivation(), getCollocatedComponent(), getComponent(), getComponentInfo(), getComponentNonSticky(), internalReleaseComponent(), internalRequestComponent(), internalRestartComponent(), makeComponentImmortal(), and registerComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::finalizeFederation (  )  [inline, private]

Finalize manager federation.

References domains, dottedToHierarchical(), federationDirectory, federationEnabled, and unbind().

Referenced by shutdown().

int com::cosylab::acs::maci::manager::ManagerImpl::forceReleaseComponent ( int  id,
URI  curl 
) throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
synchronized long com::cosylab::acs::maci::manager::ManagerImpl::generateExecutionId (  )  [inline, protected]

References lastExecutionId.

Referenced by internalNoSyncRequestComponent(), and login().

HashSet com::cosylab::acs::maci::manager::ManagerImpl::getActiveAlarms (  )  [inline]
Returns:
the activeAlarms

References activeAlarms.

HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getAdministrators (  )  [inline]
ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getAdministrators ( int  excludeHandle  )  [inline, private]

Returns array of currently logged administrators.

Parameters:
excludeHandle handle of administrator not to be included in the array, can be 0.
Returns:
ClientInfo[] array of currently logged administrators

References administrators, com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ClientInfo::getHandle(), com::cosylab::acs::maci::manager::HandleDataStore::next(), and com::cosylab::acs::maci::manager::HandleDataStore::size.

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::getClientInfo ( int  id  )  [inline]
ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getClientInfo (  )  [inline, private]
ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getClientInfo ( int  id,
int[]  handles,
String  name_wc 
) throws AcsJNoPermissionEx [inline]
HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getClients (  )  [inline]

Returns the clients.

Returns:
HandleDataStore

References clients.

Referenced by notifyComponentAvailable(), and notifyComponentUnavailable().

ClientInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getClients ( int  excludeHandle,
int[]  handles 
) [inline, private]
ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getCollocatedComponent ( int  id,
ComponentSpec  componentSpec,
boolean  markAsDefault,
URI  targetComponentURI 
) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline]
Component com::cosylab::acs::maci::manager::ManagerImpl::getComponent ( int  id,
URI  curl,
boolean  activate,
StatusHolder  status,
boolean  allowServices 
) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline, private]
Component com::cosylab::acs::maci::manager::ManagerImpl::getComponent ( int  id,
URI  curl,
boolean  activate,
StatusHolder  status 
) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline]
ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getComponentInfo ( int  id  )  [inline]

Get component info. for specified id of Component.

Parameters:
id handle of the component whose info. should be returned
returns requested info, null if component with requested handle does not exits

References components, com::cosylab::acs::maci::manager::HandleDataStore::get(), handle, com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, and com::cosylab::acs::maci::manager::HandleDataStore::isAllocated().

ComponentInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getComponentInfo ( int  id,
int[]  handles,
String  name_wc,
String  type_wc,
boolean  activeOnly 
) throws AcsJNoPermissionEx [inline]
See also:
com.cosylab.acs.maci.Manager::getComponentInfo(int, int[], String, String, boolean)

here to check if CDB is available

name.equals(ComponentSpec.COMPSPEC_ANY) &&

Implements com::cosylab::acs::maci::Manager.

References components, componentsDAO, CURL_URI_SCHEMA, extractName(), com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::cdb::client::DAOProxy::get_field_data(), com::cosylab::acs::maci::ComponentInfo::getComponent(), getComponent(), com::cosylab::acs::maci::Manager::getComponentInfo(), getComponentsDAOProxy(), getComponentsList(), com::cosylab::acs::maci::ComponentInfo::getContainerName(), getManagerForDomain(), com::cosylab::acs::maci::ComponentInfo::getName(), com::cosylab::acs::maci::ComponentInfo::getType(), INTERDOMAIN_MANAGER_HANDLE, logger, com::cosylab::acs::maci::manager::HandleDataStore::next(), readStringCharacteristics(), reportException(), securityCheck(), com::cosylab::acs::maci::ComponentInfo::setContainerName(), and com::cosylab::acs::maci::ComponentInfo::setName().

Referenced by addComponentOwner(), getClients(), internalNoSyncReleaseComponent(), internalNoSyncRequestComponent(), internalRequestDefaultComponent(), com::cosylab::acs::maci::test::ManagerImplTest::internalTestGetHierarchicalComponent(), com::cosylab::acs::maci::test::ManagerImplTest::internalTestGetHierarchicalComponentPassingComponentHandle(), removeComponentOwner(), com::cosylab::acs::maci::test::ManagerImplTest::testAllComponentNames(), com::cosylab::acs::maci::test::ManagerImplTest::testComponentInfo(), com::cosylab::acs::maci::test::ManagerImplTest::testComponentInfoTopologicalSort(), com::cosylab::acs::maci::test::ManagerImplTest::testComponentKeepAliveTime(), com::cosylab::acs::maci::test::ManagerImplTest::testContainerShutdown(), com::cosylab::acs::maci::test::ManagerImplTest::testContainerToManagerStateTransferComponents(), com::cosylab::acs::maci::test::ManagerImplTest::testForceReleaseComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testGetComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testGetCyclicHierachicalComponentAllowWithPreactivated(), com::cosylab::acs::maci::test::ManagerImplTest::testMakeComponentMortal(), com::cosylab::acs::maci::test::ManagerImplTest::testManagerShutdownWithComponentDestruction(), com::cosylab::acs::maci::test::ManagerImplTest::testManagerToContainerStateTransferComponents(), com::cosylab::acs::maci::test::ManagerImplTest::testOnDemandContainerStartupComponents(), and com::cosylab::acs::maci::test::ManagerImplTest::testStartupComponents().

Component com::cosylab::acs::maci::manager::ManagerImpl::getComponentNonSticky ( int  id,
URI  curl 
) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline]
HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getComponents (  )  [inline]
synchronized DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::getComponentsDAOProxy (  )  [inline, private]
String [] com::cosylab::acs::maci::manager::ManagerImpl::getComponentsList (  )  [inline, private]

Get list of all components.

Returns:
list of all components.

References componentListCache.

Referenced by autoStartComponents(), containerPostLoginActivation(), getComponentInfo(), internalRequestDefaultComponent(), and searchDynamicComponent().

ContainerInfo com::cosylab::acs::maci::manager::ManagerImpl::getContainerInfo ( String  name  )  [inline, private]

Get container info. for specified name of Container.

Parameters:
name name of the container whose info. should be returned, non-null
returns requested info, null if container with requested handle does not exits

References containers, com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ContainerInfo::getName(), and com::cosylab::acs::maci::manager::HandleDataStore::next().

ContainerInfo com::cosylab::acs::maci::manager::ManagerImpl::getContainerInfo ( int  id  )  [inline, private]

Get container info. for specified id of Container.

Parameters:
id handle of the container whose info. should be returned
returns requested info, null if container with requested handle does not exits

References containers, com::cosylab::acs::maci::manager::HandleDataStore::get(), handle, com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, and com::cosylab::acs::maci::manager::HandleDataStore::isAllocated().

ContainerInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getContainerInfo ( int  id,
int[]  handles,
String  name_wc 
) throws AcsJNoPermissionEx [inline]
HandleDataStore com::cosylab::acs::maci::manager::ManagerImpl::getContainers (  )  [inline]
synchronized DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::getContainersDAOProxy (  )  [inline, private]

Returns, if necessary also creates, containers DAO (CDB access).

Returns:
DAOProxy containers DAO (CDB access), otherwise null

References containersDAO, createDAO(), and NAME_CDB_DISABLE.

Referenced by autoStartComponents(), conditionalShutdownContainer(), containerLogin(), and internalNoSyncStartUpContainer().

ContainerInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getContainersInfo (  )  [inline, private]
ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getDefaultComponent ( int  id,
String  type 
) throws AcsJNoPermissionEx, NoDefaultComponentException [inline]
Map com::cosylab::acs::maci::manager::ManagerImpl::getDefaultComponents (  )  [inline]

Returns the defaultComponents.

Returns:
Map

References defaultComponents.

String com::cosylab::acs::maci::manager::ManagerImpl::getDomain (  )  [inline]
ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::getDynamicComponent ( int  id,
ComponentSpec  componentSpec,
boolean  markAsDefault 
) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline]
ComponentInfo [] com::cosylab::acs::maci::manager::ManagerImpl::getDynamicComponents ( int  id,
ComponentSpec[]  components 
) throws AcsJNoPermissionEx [inline]
See also:
com.cosylab.acs.maci.Manager::getDynamicComponents(int, com.cosylab.acs.maci.ComponentSpec[])
Todo:
this method still returns null in case of errors and only throws AcsJNoPermissions or a couple of runtime exceptions. Needs to be refactored or, probably better, deprecated.

References components, getDynamicComponent(), logger, reportException(), and securityCheck().

int com::cosylab::acs::maci::manager::ManagerImpl::getHandle (  )  [inline]
HandleMonitorEntry com::cosylab::acs::maci::manager::ManagerImpl::getHandleReleaseLog ( int  handle  )  [inline]

Get handle release log.

Parameters:
handle 
Returns:
log or null if it does not exist.

References releasedHandles.

Referenced by securityCheck().

long com::cosylab::acs::maci::manager::ManagerImpl::getLockTimeout (  )  [inline]

Returns lock timeout (deadlock detection time) in ms.

Returns:
lock timeout (deadlock detection time) in ms

References lockTimeout.

Referenced by internalRequestComponent().

Object com::cosylab::acs::maci::manager::ManagerImpl::getManagerComponentReference (  )  [inline]

Returns the managerComponentReference.

Returns:
Object

References managerComponentReference.

synchronized DAOProxy com::cosylab::acs::maci::manager::ManagerImpl::getManagerDAOProxy (  )  [inline, private]

Returns, if necessary also creates, Manager DAO (CDB access).

Returns:
DAOProxy Manager DAO (CDB access), otherwise null

References createDAO(), managerDAO, and NAME_CDB_DISABLE.

Referenced by autoStartComponents(), containerPostLoginActivation(), initializeServiceDaemons(), isServiceComponent(), readManagerConfiguration(), and setCDBAccess().

synchronized Manager com::cosylab::acs::maci::manager::ManagerImpl::getManagerForDomain ( String  domainName  )  [inline, private]

Get manager for given domain.

Parameters:
domainName domain name.
Returns:
manager for given domain, null if not found.

Todo:
CORBA specific

References dottedToHierarchical(), federationDirectory, lookup(), and managerCache.

Referenced by getComponentInfo(), internalNoSyncDeactivateComponent(), and internalNoSyncRequestComponent().

Context com::cosylab::acs::maci::manager::ManagerImpl::getRemoteDirectory (  )  [inline]

Returns the remoteDirectory.

Returns:
Context

References remoteDirectory.

Object com::cosylab::acs::maci::manager::ManagerImpl::getRemoteDirectoryComponentReference (  )  [inline]

Returns the remoteDirectoryComponentReference.

Returns:
Object

References remoteDirectoryComponentReference.

String com::cosylab::acs::maci::manager::ManagerImpl::getRequestorName ( int  id  )  [inline, private]
Component com::cosylab::acs::maci::manager::ManagerImpl::getService ( int  id,
URI  curl,
boolean  activate,
StatusHolder  status 
) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx [inline]
See also:
com.cosylab.acs.maci.Manager::getService(int, java.net.URI, boolean, StatusHolder)

Implements com::cosylab::acs::maci::Manager.

References getComponent().

ManagerShutdown com::cosylab::acs::maci::manager::ManagerImpl::getShutdownImplementation (  )  [inline]

Returns the shutdownImplementation.

Returns:
ManagerShutdown

References shutdownImplementation.

Map com::cosylab::acs::maci::manager::ManagerImpl::getUnavailableComponents (  )  [inline]

Returns the unavailableComponents.

Returns:
Map

References unavailableComponents.

boolean com::cosylab::acs::maci::manager::ManagerImpl::hasActiveAlarm ( String  faultMember  )  [inline]
boolean com::cosylab::acs::maci::manager::ManagerImpl::hasCDBEntry ( ComponentInfo  componentInfo  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::initializationDone (  )  [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::initialize ( Prevayler  prevayler,
CDBAccess  cdbAccess,
Context  context,
Logger  logger,
ManagerContainerServices  managerContainerServices 
) [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::initializeDefaultConfiguration (  )  [inline, private]

Initialize manager default configuration.

References administratorPingInterval, clientPingInterval, containerPingInterval, lockTimeout, and poolThreads.

Referenced by initialize().

void com::cosylab::acs::maci::manager::ManagerImpl::initializeFederation ( Hashtable  federationDirectoryProperties  )  throws CoreException [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::initializePingTasks (  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::initializeServiceDaemons (  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::internalDeactivateComponent ( String  name  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncDeactivateComponent ( ComponentInfo  componentInfo  )  [inline, private]

Deactivate component, issue deactivate reeust to container (or other manager).

Parameters:
componentInfo info about component to be deactivated.

References com::cosylab::acs::maci::IntArray::add(), components, conditionalShutdownContainer(), com::cosylab::acs::maci::IntArray::contains(), convertToHiearachical(), CURL_URI_SCHEMA, com::cosylab::acs::maci::Container::deactivate_components(), com::cosylab::acs::maci::Component::destruct(), executeCommand(), com::cosylab::acs::maci::IntArray::get(), com::cosylab::acs::maci::ComponentInfo::getClients(), com::cosylab::acs::maci::ComponentInfo::getComponent(), com::cosylab::acs::maci::ComponentInfo::getComponents(), com::cosylab::acs::maci::ContainerInfo::getComponents(), com::cosylab::acs::maci::ContainerInfo::getContainer(), com::cosylab::acs::maci::ComponentInfo::getContainer(), getContainerInfo(), com::cosylab::acs::maci::ContainerInfo::getHandle(), com::cosylab::acs::maci::ComponentInfo::getHandle(), getManagerForDomain(), com::cosylab::acs::maci::ContainerInfo::getName(), com::cosylab::acs::maci::ComponentInfo::getName(), handle, com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, INTERDOMAIN_MANAGER_HANDLE, com::cosylab::acs::maci::manager::HandleDataStore::isAllocated(), logger, makeUnavailable(), notifyComponentDeactivated(), com::cosylab::acs::maci::Manager::releaseComponent(), com::cosylab::acs::maci::IntArray::size(), com::cosylab::acs::maci::IntArray::toArray(), and unbind().

Referenced by internalDeactivateComponent(), and internalNoSyncReleaseComponent().

int com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncReleaseComponent ( int  owner,
int  h,
boolean  force 
) throws AcsJNoPermissionEx [inline, private]

Internal method for releasing components.

Parameters:
owner owner of the component.
h handle of the component to be released.
force force deactivate, if still has owners then component will be made unavailable.
Returns:
Number of clients that are still using the component after the operation completed.

TODO !!!!!!!!!!!!!! no more handle -> componentInfo data

References com::cosylab::acs::maci::HandleConstants::COMPONENT_MASK, components, com::cosylab::acs::maci::IntArray::contains(), CURL_URI_SCHEMA, delayedDeactivationTask, executeCommand(), com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ComponentInfo::getClients(), getComponentInfo(), getComponentsDAOProxy(), com::cosylab::acs::maci::ComponentInfo::getContainer(), com::cosylab::acs::maci::ComponentInfo::getContainerName(), getHandle(), com::cosylab::acs::maci::ComponentInfo::getHandle(), com::cosylab::acs::maci::ComponentInfo::getKeepAliveTime(), com::cosylab::acs::maci::ComponentInfo::getName(), handle, com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, internalNoSyncDeactivateComponent(), com::cosylab::acs::maci::manager::HandleDataStore::isAllocated(), logger, notifyComponentReleased(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::notifyTopologyChange(), readLongCharacteristics(), com::cosylab::acs::maci::ManagerConstants::RELEASE_IMMEDIATELY, com::cosylab::acs::maci::ManagerConstants::RELEASE_TIME_UNDEFINED, removeComponentOwner(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setID(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setProtectedResource(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setReason(), com::cosylab::acs::maci::IntArray::size(), topologySortManager, com::cosylab::acs::maci::HandleConstants::TYPE_MASK, and unavailableComponents.

Referenced by internalReleaseComponent().

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRequestComponent ( int  requestor,
String  name,
String  type,
String  code,
String  containerName,
int  keepAliveTime,
StatusHolder  status,
boolean  activate 
) throws AcsJCannotGetComponentEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline, private]

Internal method for requesting components (non sync).

Parameters:
requestor requestor of the component.
name name of component to be requested, non-null.
type type of component to be requested; if null CDB will be queried.
code code of component to be requested; if null CDB will be queried.
containerName container name of component to be requested; if null CDB will be queried.
status returned completion status of the request.
activate true if component has to be activated
Returns:
componentInfo ComponentInfo of requested component.

MF tmp (handle)

!!! ACID

References com::cosylab::acs::maci::Container::activate_component(), com::cosylab::acs::maci::IntArray::add(), addComponentOwner(), bind(), checkContainerShutdownState(), clients, com::cosylab::acs::maci::ComponentStatus::COMPONENT_ACTIVATED, com::cosylab::acs::maci::HandleConstants::COMPONENT_MASK, components, com::cosylab::acs::maci::Component::construct(), com::cosylab::acs::maci::IntArray::contains(), convertToHiearachical(), CURL_URI_SCHEMA, com::cosylab::acs::maci::Container::deactivate_components(), com::cosylab::acs::maci::Component::doesImplement(), executeCommand(), com::cosylab::acs::maci::manager::HandleDataStore::first, generateExecutionId(), com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ComponentInfo::getClients(), com::cosylab::acs::maci::ComponentInfo::getCode(), com::cosylab::acs::maci::ComponentInfo::getComponent(), com::cosylab::acs::maci::Manager::getComponent(), com::cosylab::acs::maci::Manager::getComponentInfo(), getComponentInfo(), com::cosylab::acs::maci::ContainerInfo::getComponents(), com::cosylab::acs::maci::ComponentInfo::getComponents(), getComponentsDAOProxy(), com::cosylab::acs::maci::ContainerInfo::getContainer(), com::cosylab::acs::maci::ComponentInfo::getContainer(), getContainerInfo(), com::cosylab::acs::maci::ComponentInfo::getContainerName(), com::cosylab::acs::maci::ComponentInfo::getDynamicContainerName(), com::cosylab::acs::maci::ContainerInfo::getHandle(), getHandle(), com::cosylab::acs::maci::ComponentInfo::getHandle(), com::cosylab::acs::maci::ComponentInfo::getInterfaces(), com::cosylab::acs::maci::ComponentInfo::getKeepAliveTime(), getManagerForDomain(), com::cosylab::acs::maci::ContainerInfo::getName(), com::cosylab::acs::maci::ComponentInfo::getName(), com::cosylab::acs::maci::Component::getObject(), com::cosylab::acs::maci::StatusHolder::getStatus(), com::cosylab::acs::maci::ComponentInfo::getType(), com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, INTERDOMAIN_MANAGER_HANDLE, com::cosylab::acs::maci::manager::HandleDataStore::isAllocated(), com::cosylab::acs::maci::ComponentInfo::isDynamic, logger, lookup(), com::cosylab::acs::maci::manager::HandleDataStore::next(), notifyComponentActivated(), notifyComponentAvailable(), notifyComponentRequested(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::notifyTopologyChange(), pendingActivations, prevayler, readLongCharacteristics(), readStringCharacteristics(), com::cosylab::acs::maci::ManagerConstants::RELEASE_IMMEDIATELY, com::cosylab::acs::maci::ManagerConstants::RELEASE_NEVER, com::cosylab::acs::maci::ManagerConstants::RELEASE_TIME_UNDEFINED, removeComponentOwner(), com::cosylab::acs::maci::ComponentInfo::setAccessRights(), com::cosylab::acs::maci::ComponentInfo::setClients(), alma::maciErrType::wrappers::AcsJComponentSpecIncompatibleWithActiveComponentEx::setComponentCode(), com::cosylab::acs::maci::ComponentInfo::setComponents(), alma::maciErrType::wrappers::AcsJComponentSpecIncompatibleWithActiveComponentEx::setComponentType(), com::cosylab::acs::maci::ComponentInfo::setContainer(), com::cosylab::acs::maci::ComponentInfo::setContainerName(), alma::maciErrType::wrappers::AcsJComponentSpecIncompatibleWithActiveComponentEx::setContainerName(), alma::maciErrType::wrappers::AcsJComponentSpecIncompatibleWithActiveComponentEx::setCURL(), com::cosylab::acs::maci::ComponentInfo::setDynamic(), com::cosylab::acs::maci::ComponentInfo::setDynamicContainerName(), com::cosylab::acs::maci::ComponentInfo::setHandle(), com::cosylab::acs::maci::ComponentInfo::setInterfaces(), com::cosylab::acs::maci::ComponentInfo::setKeepAliveTime(), startUpContainer(), com::cosylab::acs::maci::IntArray::toArray(), topologySortManager, com::cosylab::acs::maci::HandleConstants::TYPE_MASK, and unavailableComponents.

Referenced by internalRequestComponent().

Component com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRestartComponent ( int  owner,
int  h 
) throws AcsJNoPermissionEx [inline, private]
ContainerInfo com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncStartUpContainer ( String  containerName  )  [inline, private]

Start-up container (if it has a deploy info).

Parameters:
containerName name of the container to start up.
Returns:
container info of container, null if failed to start.

References containerLoggedInMonitor, getContainerInfo(), getContainersDAOProxy(), com::cosylab::acs::maci::Transport::getDaemon(), com::cosylab::acs::maci::Transport::getManagerReference(), logger, readStringCharacteristics(), com::cosylab::acs::maci::ContainerInfo::setImplLang(), com::cosylab::acs::maci::Daemon::startContainer(), and transport.

Referenced by startUpContainer().

int com::cosylab::acs::maci::manager::ManagerImpl::internalReleaseComponent ( int  owner,
int  h,
boolean  force 
) throws AcsJNoPermissionEx, AcsJBadParameterEx [inline, private]
int com::cosylab::acs::maci::manager::ManagerImpl::internalReleaseComponent ( int  owner,
URI  curl,
boolean  force 
) throws AcsJNoPermissionEx, AcsJBadParameterEx [inline, private]

Internal method for releasing components.

Parameters:
owner owner of the component, if manager's own handle then deactivation will be forced
curl CURL of the component to be released.
force force deactivate, if still has owners then component will be made unavailable.
Returns:
Number of clients that are still using the component after the operation completed.

References components, extractName(), com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ComponentInfo::getHandle(), com::cosylab::acs::maci::ComponentInfo::getName(), and com::cosylab::acs::maci::manager::HandleDataStore::next().

Referenced by forceReleaseComponent(), makeComponentImmortal(), releaseComponent(), com::cosylab::acs::maci::manager::ManagerImpl::ReleaseComponentTask::run(), and unregisterComponent().

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalRequestComponent ( int  requestor,
String  name,
String  type,
String  code,
String  containerName,
int  keepAliveTime,
StatusHolder  status,
boolean  activate 
) throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline, private]

Internal method for requesting components.

Parameters:
requestor requestor of the component.
name name of component to be requested, non-null.
type type of component to be requested; if null CDB will be queried.
code code of component to be requested; if null CDB will be queried.
containerName container name of component to be requested; if null CDB will be queried.
status returned completion status of the request.
activate true if component has to be activated
Returns:
componentInfo ComponentInfo of requested component.

References acquireSynchronizationObject(), activationPendingRWLock, checkCyclicDependency(), getLockTimeout(), internalNoSyncRequestComponent(), logger, com::cosylab::acs::maci::manager::ReaderPreferenceReadWriteLock::readLock(), releaseSynchronizationObject(), alma::jmanagerErrType::wrappers::AcsJSyncLockFailedEx::setCURL(), alma::maciErrType::wrappers::AcsJCannotGetComponentEx::setCURL(), and alma::jmanagerErrType::wrappers::AcsJSyncLockFailedEx::setRequestor().

Component com::cosylab::acs::maci::manager::ManagerImpl::internalRequestComponent ( int  requestor,
URI  curl,
StatusHolder  status,
boolean  activate 
) throws AcsJCannotGetComponentEx [inline, private]

Internal method for requesting components.

Parameters:
requestor requestor of the component.
curl curl of the component to be requested.
status status of the component.
activate true if component has to be activated
Returns:
component requested component.

References acquireSynchronizationObject(), activationPendingRWLock, checkCyclicDependency(), extractName(), com::cosylab::acs::maci::ComponentInfo::getComponent(), getLockTimeout(), internalNoSyncRequestComponent(), com::cosylab::acs::maci::manager::ReaderPreferenceReadWriteLock::readLock(), com::cosylab::acs::maci::ManagerConstants::RELEASE_TIME_UNDEFINED, releaseSynchronizationObject(), and alma::maciErrType::wrappers::AcsJCannotGetComponentEx::setCURL().

Component com::cosylab::acs::maci::manager::ManagerImpl::internalRequestComponent ( int  requestor,
URI  curl,
StatusHolder  status 
) throws AcsJCannotGetComponentEx [inline, private]

Internal method for requesting components.

Parameters:
requestor requestor of the component.
curl curl of the component to be requested.
status status of the component.
Returns:
component retuested component.

Referenced by autoStartComponents(), containerPostLoginActivation(), getComponent(), internalRequestDefaultComponent(), internalRequestDynamicComponent(), and com::cosylab::acs::maci::manager::ManagerImpl::RequestComponentTask::run().

ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalRequestDefaultComponent ( int  requestor,
String  type 
) throws NoDefaultComponentException [inline, private]
ComponentInfo com::cosylab::acs::maci::manager::ManagerImpl::internalRequestDynamicComponent ( int  requestor,
ComponentSpec  componentSpec 
) throws AcsJCannotGetComponentEx, AcsJSyncLockFailedEx, AcsJNoPermissionEx, AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx [inline, private]

Internal method for requesting dynamic components.

Resolution: component_name and component_type can be considered as "determinator" fields, they play important role in search algorithm. component_code and container_name can be considered as "override" fields, they only help to find closest match. Rule: unspecified component_name case implies that a new component will be activated. Search points (8,4,2,1): component_name, component_type, component_code, container_name.

  name | type | search criteria
 -----------------------------
    *  |   *  | throw IncompleteComponentSpecException
    X  |   *  | (equals, wildcard)
    *  |   X  | (equals, equals) w/ name generation
    X  |   X  | (wildcard, equals) - overriding type is not allowed
 

'name' can be also something like "ANT1/*" (ends with) and is threated just like "*".

Parameters:
requestor requestor of the component.
componentSpec requested component ComponentSpec
Returns:
componentInfo ComponentInfo of requested dynamic component.

Todo:
not perfect

References getClientInfo(), getContainersInfo(), com::cosylab::acs::maci::ComponentInfo::getName(), internalRequestComponent(), loadBalancingStrategy, com::cosylab::acs::maci::ManagerConstants::RELEASE_TIME_UNDEFINED, searchDynamicComponent(), com::cosylab::acs::maci::loadbalancing::LoadBalancingStrategy::selectContainer(), alma::maciErrType::wrappers::AcsJIncompleteComponentSpecEx::setReason(), and alma::maciErrType::wrappers::AcsJInvalidComponentSpecEx::setReason().

Referenced by getCollocatedComponent(), and getDynamicComponent().

Component com::cosylab::acs::maci::manager::ManagerImpl::internalRestartComponent ( int  owner,
int  h 
) throws AcsJNoPermissionEx [inline, private]
Component com::cosylab::acs::maci::manager::ManagerImpl::internalRestartComponent ( int  owner,
URI  curl 
) throws AcsJNoPermissionEx [inline, private]

Internal method for restarting components.

Parameters:
owner owner of the component.
curl CURL of the component to be restarted.
Returns:
Newly restarted component, null if failed.

References components, extractName(), com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ComponentInfo::getHandle(), com::cosylab::acs::maci::ComponentInfo::getName(), and com::cosylab::acs::maci::manager::HandleDataStore::next().

Referenced by restartComponent().

boolean com::cosylab::acs::maci::manager::ManagerImpl::isLocalDomainCURL ( URI  curl  )  [inline, private]

Check if CURL belongs to local domain.

Parameters:
curl CURL to be checked.
Returns:
true if CURL belongs to local domain, false otherwise.

References domain, and domains.

Referenced by checkCURL(), and extractName().

boolean com::cosylab::acs::maci::manager::ManagerImpl::isServiceComponent ( String  name  )  [inline]

Checks if component name is a service component name, list of names is defined in the CDB.

Parameters:
name name to be checked, non-null
Returns:
true if component name is service component name, false otherwise

References com::cosylab::cdb::client::DAOProxy::get_string_seq(), getManagerDAOProxy(), and logger.

Referenced by getComponent(), and com::cosylab::acs::maci::test::ManagerImplTest::testManagerIsServiceComponent().

boolean com::cosylab::acs::maci::manager::ManagerImpl::isShuttingDown (  )  [inline]

Return shutdown status of the Manager.

Returns:
shutdown status of the Manager

References shutdown.

Referenced by containerPostLoginActivation(), and com::cosylab::acs::maci::manager::app::ManagerEngine::destroyManager().

void com::cosylab::acs::maci::manager::ManagerImpl::logHandleRelease ( int  handle,
WhyUnloadedReason  reason 
) [inline]

Log handle release.

Parameters:
handle 
reason 

References enableHandleMonitoring, and releasedHandles.

ClientInfo com::cosylab::acs::maci::manager::ManagerImpl::login ( Client  reference  )  throws AcsJNoPermissionEx [inline]
See also:
com.cosylab.acs.maci.Manager::login(Client)

Implements com::cosylab::acs::maci::Manager.

References administratorLogin(), clientLogin(), containerLogin(), generateExecutionId(), com::cosylab::acs::maci::AuthenticationData::getClientType(), com::cosylab::acs::maci::AuthenticationData::getExecutionId(), com::cosylab::acs::maci::ClientInfo::getHandle(), com::cosylab::acs::maci::AuthenticationData::getImplLang(), com::cosylab::acs::maci::AuthenticationData::getTimeStamp(), logger, alma::maciErrType::wrappers::AcsJNoPermissionEx::setID(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setReason(), and shutdown.

Referenced by com::cosylab::acs::maci::test::ManagerImplTest::internalTestGetHierarchicalComponent(), com::cosylab::acs::maci::test::ManagerImplTest::internalTestGetHierarchicalComponentPassingComponentHandle(), com::cosylab::acs::maci::test::ManagerImplTest::testAdministratorNotifications(), com::cosylab::acs::maci::test::ManagerImplTest::testAllComponentNames(), com::cosylab::acs::maci::test::ManagerImplTest::testClientInfo(), com::cosylab::acs::maci::test::ManagerImplTest::testComponentInfo(), com::cosylab::acs::maci::test::ManagerImplTest::testComponentInfoTopologicalSort(), com::cosylab::acs::maci::test::ManagerImplTest::testComponentKeepAliveTime(), com::cosylab::acs::maci::test::ManagerImplTest::testConcurrentContainersLogin(), com::cosylab::acs::maci::test::ManagerImplTest::testContainerInfo(), com::cosylab::acs::maci::test::ManagerImplTest::testContainerShutdown(), com::cosylab::acs::maci::test::ManagerImplTest::testContainerToManagerStateTransferComponents(), com::cosylab::acs::maci::test::ManagerImplTest::testExpiredHandle(), com::cosylab::acs::maci::test::ManagerImplTest::testForceReleaseComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testGetCollocatedComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testGetComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testGetCyclicHierachicalComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testGetCyclicHierachicalComponentAllowWithPreactivated(), com::cosylab::acs::maci::test::ManagerImplTest::testGetDefaultComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testGetDynamicComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testLogin(), com::cosylab::acs::maci::test::ManagerImplTest::testLogout(), com::cosylab::acs::maci::test::ManagerImplTest::testMakeComponentMortal(), com::cosylab::acs::maci::test::ManagerImplTest::testManagerShutdownWithComponentDestruction(), com::cosylab::acs::maci::test::ManagerImplTest::testManagerToContainerStateTransferComponents(), com::cosylab::acs::maci::test::ManagerImplTest::testOnDemandContainer(), com::cosylab::acs::maci::test::ManagerImplTest::testOnDemandContainerStartupComponents(), com::cosylab::acs::maci::test::ManagerImplTest::testPing(), com::cosylab::acs::maci::test::ManagerImplTest::testRegisterComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testRestartComponent(), com::cosylab::acs::maci::test::ManagerImplTest::testSequentialContainersLogin(), com::cosylab::acs::maci::test::ManagerImplTest::testShutdown(), com::cosylab::acs::maci::test::ManagerImplTest::testStartupComponents(), and com::cosylab::acs::maci::test::ManagerImplTest::testUnregisterComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::logout ( int  id,
boolean  pingFailed 
) throws AcsJNoPermissionEx [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::logout ( int  id  )  throws AcsJNoPermissionEx [inline]
Object com::cosylab::acs::maci::manager::ManagerImpl::lookup ( Context  remoteDirectory,
String  name,
String  type 
) [inline, private]

Lookups for an object in remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
type type of the object
Returns:
object object found in the remote directory, null if nout found

References CURL_URI_SCHEMA, and logger.

Object com::cosylab::acs::maci::manager::ManagerImpl::lookup ( String  name,
String  type 
) [inline, private]

Lookups for an object in root of the remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
name name of the object, code non-null
type type of the object
Returns:
object object found in the remote directory, null if nout found

References remoteDirectory.

Referenced by getComponent(), getManagerForDomain(), and internalNoSyncRequestComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::makeComponentImmortal ( int  id,
URI  curl,
boolean  immortalState 
) throws AcsJCannotGetComponentEx, AcsJNoPermissionEx, AcsJBadParameterEx [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::makeUnavailable ( ComponentInfo  componentInfo  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::notifyClientDisconnectShutdown (  )  [inline, private]

Notifies clients to disconnect or shutdown.

Task thats invokes Client::disconnect method.

References com::cosylab::acs::maci::ClientInfo::getClient(), getClientInfo(), logger, and threadPool.

void com::cosylab::acs::maci::manager::ManagerImpl::notifyClientLogin ( final ClientInfo  clientInfo,
final long  timeStamp,
final long  executionId 
) [inline, private]

Notifies administrators about newly logged client.

Parameters:
clientInfo newly logged client, non-null

Task thats invokes Administrator::clientLoggedIn method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), com::cosylab::acs::maci::ClientInfo::getHandle(), logger, and threadPool.

Referenced by administratorLogin(), and clientLogin().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyClientLogout ( final ClientInfo  clientInfo,
final long  timeStamp 
) [inline, private]

Notifies administrators about client logging out.

Parameters:
client client logging out, non-null

Task thats invokes Administrator::clientLoggedOut method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), com::cosylab::acs::maci::ClientInfo::getHandle(), logger, and threadPool.

Referenced by administratorLogout(), and clientLogout().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentActivated ( final ComponentInfo  componentInfo,
final long  timeStamp,
final long  executionId 
) [inline, private]

Notifies administrators about Component activation.

Parameters:
componentInfo activated component info, non-null

Task thats invokes Administrator::component_activated method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), logger, and threadPool.

Referenced by internalNoSyncRequestComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentAvailable ( int  excludeClient,
int[]  clientHandles,
ComponentInfo[]  info 
) [inline, private]

Notifies administrators about component request.

Parameters:
excludeClient client not to be informed, 0 if none
clientHandles array of client handles to be informed, non-null
info component infos to be sent to the clients, non-null

Task thats invokes Client::components_available method.

References clients, com::cosylab::acs::maci::Client::components_available(), com::cosylab::acs::maci::ClientInfo::getClient(), getClients(), logger, and threadPool.

Referenced by containerInternalStateMerge(), and internalNoSyncRequestComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentDeactivated ( final int  handle,
final long  timeStamp 
) [inline, private]

Notifies administrators about Component deactivation.

Parameters:
component deactivated component handle, non-0

Task thats invokes Administrator::component_deactivated method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), logger, and threadPool.

Referenced by internalNoSyncDeactivateComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentReleased ( int[]  requestors,
int[]  components,
final long  timeStamp 
) [inline, private]

Notifies administrators about Component request.

Parameters:
requestors array of clients requesting the Component, non-null
components array of requested the components, non-null

Task thats invokes Administrator::components_requested method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), logger, and threadPool.

Referenced by internalNoSyncReleaseComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentRequested ( int[]  requestors,
int[]  components,
final long  timeStamp 
) [inline, private]

Notifies administrators about Component request.

Parameters:
requestors array of clients requesting the Component, non-null
components array of requested the components, non-null

Task thats invokes Administrator::components_requested method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), logger, and threadPool.

Referenced by internalNoSyncRequestComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyComponentUnavailable ( int  excludeClient,
int[]  clientHandles,
String[]  names 
) [inline, private]

Notifies administrators about Component request.

Parameters:
excludeClient client not to be informed, 0 if none
clientHandles array of client handles to be informed, non-null
names component names to be sent to the clients, non-null

Task thats invokes Client::components_unavailable method.

References clients, com::cosylab::acs::maci::Client::components_unavailable(), com::cosylab::acs::maci::ClientInfo::getClient(), getClients(), logger, and threadPool.

Referenced by makeUnavailable().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerDisconnectShutdown ( int  code  )  [inline, private]

Notifies containers to disconnect or shutdown.

Parameters:
code code to be sent to container, if 0 disconnect method will be called.

Task thats invokes Container::shutdown method.

Task thats invokes Container::shutdown method.

References com::cosylab::acs::maci::ContainerInfo::getContainer(), getContainersInfo(), logger, shutdown, and threadPool.

Referenced by shutdown().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerLogin ( final ContainerInfo  containerInfo,
final long  timeStamp,
final long  executionId 
) [inline, private]

Notifies administrators about newly logged container.

Parameters:
containerInfo newly logged container, non-null

Task thats invokes Administrator::containerLoggedIn method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), com::cosylab::acs::maci::ContainerInfo::getHandle(), logger, and threadPool.

Referenced by containerLogin().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerLogout ( final ContainerInfo  containerInfo,
final long  timeStamp 
) [inline, private]

Notifies administrators about container logging out.

Parameters:
containerInfo container logging out, non-null

Task thats invokes Administrator::containerLoggedIn method.

References getAdministrators(), com::cosylab::acs::maci::ClientInfo::getClient(), com::cosylab::acs::maci::ContainerInfo::getHandle(), logger, and threadPool.

Referenced by containerLogout().

void com::cosylab::acs::maci::manager::ManagerImpl::notifyContainerShutdownOrder ( ContainerInfo  containerInfo,
int[]  handles 
) [inline, private]

Informs containers abouts its component shutdown order.

Parameters:
containerInfo container to inform
handles ordered list of component handles

Task thats invokes Container::shutdown method.

References com::cosylab::acs::maci::ContainerInfo::getContainer(), logger, and threadPool.

double com::cosylab::acs::maci::manager::ManagerImpl::readDoubleCharacteristics ( DAOProxy  dao,
String  path,
double  defaultValue,
boolean  silent 
) [inline, private]

Reads DAO (CDB access) of double type.

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
silent do not complain, if characteristics not found.
Returns:
double value read, 0.0 on failure.

References com::cosylab::cdb::client::DAOProxy::get_double(), and reportException().

Referenced by readManagerConfiguration().

int com::cosylab::acs::maci::manager::ManagerImpl::readLongCharacteristics ( DAOProxy  dao,
String  path,
int  defaultValue,
boolean  silent 
) [inline, private]

Reads DAO (CDB access) of long type.

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
silent do not complain, if characteristics not found.
Returns:
int value read, 0 on failure.

References com::cosylab::cdb::client::DAOProxy::get_long(), and reportException().

Referenced by conditionalShutdownContainer(), containerLogin(), internalNoSyncReleaseComponent(), internalNoSyncRequestComponent(), readManagerConfiguration(), and searchDynamicComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::readManagerConfiguration (  )  [inline, private]
String com::cosylab::acs::maci::manager::ManagerImpl::readStringCharacteristics ( DAOProxy  dao,
String  path,
boolean  silent 
) [inline, private]

Reads DAO (CDB access) of string type.

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
silent do not complain, if characteristics not found
Returns:
String value read, null on failure

References com::cosylab::cdb::client::DAOProxy::get_string(), and reportException().

String com::cosylab::acs::maci::manager::ManagerImpl::readStringCharacteristics ( DAOProxy  dao,
String  path 
) [inline, private]

Reads DAO (CDB access) of string type (uses getStringCharctareistics method).

Parameters:
path path to be read non-null.
dao DAO on which to perform read request.
Returns:
String value read, null on failure

Referenced by autoStartComponents(), containerLogin(), containerPostLoginActivation(), getCollocatedComponent(), getComponentInfo(), hasCDBEntry(), internalNoSyncRequestComponent(), internalNoSyncStartUpContainer(), internalRequestDefaultComponent(), refreshComponentsList(), and searchDynamicComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::rebind ( Context  remoteDirectory,
String  name,
String  type,
Object  object 
) [inline, private]
Parameters:
remoteDirectory parent context of parentContext.
parent name of context to bind.
parentContext context to bind.
Exceptions:
NamingException private void generateHiearchyContexts(Context remoteDirectory, String parent, Context parentContext) throws NamingException { /
Todo:
CORBA specific if (remoteDirectory instanceof com.sun.jndi.cosnaming.CNCtx) { boolean isParentDomain = remoteDirectory.getNameInNamespace().length() == 0 || remoteDirectory.getNameInNamespace().endsWith(".D");

org.omg.CORBA.Object parentRepresentation = ((com.sun.jndi.cosnaming.CNCtx)remoteDirectory)._nc; if (parent.endsWith(".D")) { domain binding parentContext.rebind("Parent.D", parentRepresentation); } else if (parent.endsWith(".F")) { hierarchical component binding if (isParentDomain) parentContext.rebind("Domain.D", parentRepresentation); else parentContext.rebind("Domain.D", remoteDirectory.lookup("Domain.D")); parentContext.rebind("Parent.F", parentRepresentation); } } else if (remoteDirectory instanceof InitialContext) generateHiearchyContexts((Context)((InitialContext)remoteDirectory).lookup(""), parent, parentContext); else new MessageLogEntry(this, "generateHiearchyContexts", "Unsupported remote directory, class '" + remoteDirectory.getClass().getName() + "'.", Level.WARNING).dispatch(); } Rebind object to the root of remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.'). NOTE: Does not support hierarchical names.

Parameters:
name name of the object, code non-null
type type of the object
object object to be binded

private void rebind(String name, String type, Object object) { rebind(remoteDirectory, name, type, object); } Rebind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.'). NOTE: Does not support hierarchical names.

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
type type of the object
object object to be binded

References CURL_URI_SCHEMA, and logger.

Referenced by bind().

String [] com::cosylab::acs::maci::manager::ManagerImpl::refreshComponentsList ( DAOProxy  dc  )  [inline, private]

Searches dao for all potential (nodes containing Name attribute) ComponentInfo nodes.

Parameters:
dc dao to be searched.
Returns:
list of all potential ComponentInfo nodes.

Todo:
this could be done better (to check if all attributes exist)

References cdbAccess, com::cosylab::cdb::client::DAOProxy::get_field_data(), com::cosylab::cdb::client::CDBAccess::getSubNodes(), logger, and readStringCharacteristics().

Referenced by getComponentsDAOProxy().

int com::cosylab::acs::maci::manager::ManagerImpl::registerComponent ( int  id,
URI  curl,
String  type,
Component  component 
) throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
See also:
com.cosylab.acs.maci.Manager::registerComponent(int, URI, String, Component)

Implements com::cosylab::acs::maci::Manager.

References com::cosylab::acs::maci::IntArray::add(), bind(), checkCURL(), com::cosylab::acs::maci::HandleConstants::COMPONENT_MASK, components, com::cosylab::acs::maci::IntArray::contains(), convertToHiearachical(), executeCommand(), extractName(), com::cosylab::acs::maci::manager::HandleDataStore::first, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ComponentInfo::getClients(), com::cosylab::acs::maci::ComponentInfo::getHandle(), getHandle(), com::cosylab::acs::maci::ComponentInfo::getName(), com::cosylab::acs::maci::ComponentInfo::getType(), handle, com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, logger, com::cosylab::acs::maci::manager::HandleDataStore::next(), random, securityCheck(), com::cosylab::acs::maci::ComponentInfo::setAccessRights(), com::cosylab::acs::maci::ComponentInfo::setContainer(), com::cosylab::acs::maci::ComponentInfo::setContainerName(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setID(), com::cosylab::acs::maci::ComponentInfo::setInterfaces(), alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameter(), alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameterValue(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setProtectedResource(), and alma::maciErrType::wrappers::AcsJNoPermissionEx::setReason().

Referenced by com::cosylab::acs::maci::test::ManagerImplTest::testRegisterComponent(), and com::cosylab::acs::maci::test::ManagerImplTest::testUnregisterComponent().

int com::cosylab::acs::maci::manager::ManagerImpl::releaseComponent ( int  id,
URI  curl 
) throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::releaseComponents ( ComponentInfo[]  infos  )  throws AcsJNoPermissionEx [inline, private]

Release components (using manager handle)

Parameters:
infos components to release

References getHandle(), releaseComponents(), and reportException().

void com::cosylab::acs::maci::manager::ManagerImpl::releaseComponents ( int  id,
URI[]  curls 
) throws AcsJNoPermissionEx [inline]
See also:
com.cosylab.acs.maci.Manager::releaseComponents(int, URI[])

References logger, releaseComponent(), reportException(), and securityCheck().

Referenced by releaseComponents(), shutdown(), shutdownContainer(), and com::cosylab::acs::maci::test::ManagerImplTest::testReleaseComponents().

void com::cosylab::acs::maci::manager::ManagerImpl::releaseSynchronizationObject ( String  name,
boolean  release 
) [inline, private]

Release synchronization lock for named object.

Parameters:
name name of the object whose lock to release.
release set to false if there is no need to call release on synchronization lock.

References activationSynchronization, com::cosylab::acs::maci::manager::ManagerImpl::ReferenceCountingLock::decrement(), and com::cosylab::acs::maci::manager::ManagerImpl::ReferenceCountingLock::release().

void com::cosylab::acs::maci::manager::ManagerImpl::releaseSynchronizationObject ( String  name  )  [inline, private]

Release synchronization lock for named object.

Parameters:
name name of the object whose lock to release.

Referenced by acquireSynchronizationObject(), internalDeactivateComponent(), internalReleaseComponent(), internalRequestComponent(), internalRestartComponent(), and startUpContainer().

void com::cosylab::acs::maci::manager::ManagerImpl::removeComponentOwner ( int  componentHandle,
int  owner 
) [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::reportException ( Throwable  th  )  [inline, private]
void com::cosylab::acs::maci::manager::ManagerImpl::reportPrevaylerState ( final boolean  raise,
Throwable  alarmEx 
) [inline]
Component com::cosylab::acs::maci::manager::ManagerImpl::restartComponent ( int  id,
URI  curl 
) throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]
String [] com::cosylab::acs::maci::manager::ManagerImpl::searchDynamicComponent ( String[]  fieldNames,
String[]  requiredValues,
boolean[]  equalityRequired,
int[]  equalityPoints,
IntHolder  keepAliveTimeHolder 
) [inline, private]

Searches for the best match in Components entry in the CDB.

Parameters:
fieldNames array of fields names to be searched.
requiredValues required values of fields, if ComponentSpec.COMPSPEC_ANY any value is accepted.
equalityRequired true if requiredValues[i] and fieldNames[i] value values must match, i.e. String.equals(String) is used.
equalityPoints array of points to be given to each field whose value is equal to the CDB value, used to determine best match.
Returns:
best match found in the CDB, null on failure or if not found.

Todo:
here to check if CDB is available
Todo:
not nice way, but necessary to have hierarchical names

References componentsDAO, com::cosylab::cdb::client::DAOProxy::get_field_data(), getComponentsDAOProxy(), getComponentsList(), readLongCharacteristics(), readStringCharacteristics(), com::cosylab::acs::maci::ManagerConstants::RELEASE_TIME_UNDEFINED, and reportException().

Referenced by internalRequestDynamicComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::securityCheck ( int  id,
int  requiredRights 
) throws AcsJNoPermissionEx [inline, private]

Performs security check on given handle and if check if owner has rights permissions granted.

Validating means checking key part (KEY_MASK) of the handle.

Parameters:
id handle to be checked.
rights checks if owner of the handle has this permissions granted, can be 0.
Exceptions:
AcsJNoPermissionEx thrown if handle is not valid or handle owner has not enough permissions

References com::cosylab::acs::maci::HandleConstants::ADMINISTRATOR_MASK, administrators, com::cosylab::acs::maci::HandleConstants::CLIENT_MASK, clients, com::cosylab::acs::maci::HandleConstants::COMPONENT_MASK, components, com::cosylab::acs::maci::HandleConstants::CONTAINER_MASK, CONTAINER_RIGHTS, containers, com::cosylab::acs::maci::manager::HandleDataStore::get(), com::cosylab::acs::maci::ClientInfo::getAccessRights(), com::cosylab::acs::maci::ComponentInfo::getHandle(), com::cosylab::acs::maci::ClientInfo::getHandle(), com::cosylab::acs::maci::ContainerInfo::getHandle(), getHandle(), getHandleReleaseLog(), handle, com::cosylab::acs::maci::HandleConstants::HANDLE_MASK, com::cosylab::acs::maci::manager::HandleDataStore::isAllocated(), com::cosylab::acs::maci::HandleConstants::MANAGER_MASK, com::cosylab::acs::maci::manager::ManagerImpl::HandleMonitorEntry::reason, alma::maciErrType::wrappers::AcsJNoPermissionEx::setID(), alma::maciErrType::wrappers::AcsJNoPermissionEx::setReason(), shutdown, timeFormatter, com::cosylab::acs::maci::manager::ManagerImpl::HandleMonitorEntry::timestamp, and com::cosylab::acs::maci::HandleConstants::TYPE_MASK.

Referenced by forceReleaseComponent(), getClientInfo(), getCollocatedComponent(), getComponent(), getComponentInfo(), getComponentNonSticky(), getContainerInfo(), getDefaultComponent(), getDynamicComponent(), getDynamicComponents(), logout(), makeComponentImmortal(), registerComponent(), releaseComponent(), releaseComponents(), restartComponent(), shutdown(), shutdownContainer(), and unregisterComponent().

void com::cosylab::acs::maci::manager::ManagerImpl::sendMessage ( Client  client,
String  message,
MessageType  messageType,
short  messageID 
) [inline, private]

Sends an message to the client.

Parameters:
client client to receive the message, non-null
message message to be sent, non-null
messageType type of the message, non-null
messageID identifier for this message

References clientMessageQueue, com::cosylab::acs::maci::manager::ManagerImpl::ClientMessageTask::run(), and threadPool.

void com::cosylab::acs::maci::manager::ManagerImpl::sendMessage ( Client  client,
String  message,
MessageType  messageType 
) [inline, private]

Sends an message to the client.

Parameters:
client client to receive the message, non-null
message message to be sent, non-null
messageType type of the message, non-null

Referenced by containerPostLoginActivation().

void com::cosylab::acs::maci::manager::ManagerImpl::setCDBAccess ( CDBAccess  cdbAccess  )  [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::setDomain ( String  domain  )  [inline]

Set name of the domain, which this manager will handle.

Parameters:
domain name of the domain, which this manager will handle, non-null
See also:
getDomain

Referenced by com::cosylab::acs::maci::manager::app::ManagerEngine::initializeManager().

void com::cosylab::acs::maci::manager::ManagerImpl::setLockTimeout ( long  l  )  [inline]

Sets lock timeout (deadlock detection time) in ms.

Parameters:
l lock timeout (deadlock detection time) in ms

References lockTimeout.

void com::cosylab::acs::maci::manager::ManagerImpl::setManagerComponentReference ( Object  managerComponentReference  )  [inline]

Sets the managerComponentReference.

Parameters:
managerComponentReference The managerComponentReference to set

References bind(), and unbind().

Referenced by com::cosylab::acs::maci::manager::app::ManagerEngine::initializeManager().

void com::cosylab::acs::maci::manager::ManagerImpl::setRemoteDirectory ( Context  remoteDirectory  )  [inline]

Sets the remoteDirectory.

Parameters:
remoteDirectory The remoteDirectory to set
void com::cosylab::acs::maci::manager::ManagerImpl::setRemoteDirectoryComponentReference ( Object  remoteDirectoryComponentReference  )  [inline]

Sets the remoteDirectoryComponentReference.

Parameters:
remoteDirectoryComponentReference The remoteDirectoryComponentReference to set

Referenced by com::cosylab::acs::maci::manager::app::ManagerEngine::initializeManager().

void com::cosylab::acs::maci::manager::ManagerImpl::setShutdownImplementation ( ManagerShutdown  shutdownImplementation  )  [inline]

Sets the shutdownImplementation.

Parameters:
shutdownImplementation The shutdownImplementation to set

Referenced by com::cosylab::acs::maci::manager::app::ManagerEngine::initializeManager().

void com::cosylab::acs::maci::manager::ManagerImpl::setTransport ( Transport  transport  )  [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::shutdown ( int  id,
int  containers 
) throws AcsJNoPermissionEx [inline]
void com::cosylab::acs::maci::manager::ManagerImpl::shutdownContainer ( int  id,
String  containerName,
int  action 
) throws AcsJNoPermissionEx [inline]
ContainerInfo com::cosylab::acs::maci::manager::ManagerImpl::startUpContainer ( String  containerName  )  [inline, private]

Start-up container (if it has a deploy info).

Parameters:
containerName name of the container to start up.
Returns:
container info of container, null if failed to start.

References acquireSynchronizationObject(), getContainerInfo(), internalNoSyncStartUpContainer(), lockTimeout, and releaseSynchronizationObject().

Referenced by autoStartComponents(), and internalNoSyncRequestComponent().

String com::cosylab::acs::maci::manager::ManagerImpl::toString (  )  [inline]

Returns a single-line rendition of this instance into text.

Returns:
internal state of this instance

References domain.

void com::cosylab::acs::maci::manager::ManagerImpl::unbind ( Context  remoteDirectory,
String  name,
String  type 
) [inline, private]

Unbind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
remoteDirectory remote directory context to be used.
name name of the object, code non-null
type type of the object

References cleanupEmptyFContext(), CURL_URI_SCHEMA, and logger.

void com::cosylab::acs::maci::manager::ManagerImpl::unbind ( String  name,
String  type 
) [inline, private]

Unbind object to remote directory.

Use INS syntax specified in the INS specification. In short, the syntax is that components are left-to-right slash ('/') separated and case-sensitive. The id and kind of each component are separated by the period character ('.').

Parameters:
name name of the object, code non-null
type type of the object

References remoteDirectory.

Referenced by containerPostLoginActivation(), finalizeFederation(), internalNoSyncDeactivateComponent(), setManagerComponentReference(), and shutdown().

void com::cosylab::acs::maci::manager::ManagerImpl::unregisterComponent ( int  id,
int  h 
) throws AcsJNoPermissionEx, AcsJBadParameterEx [inline]

Member Data Documentation

Activation/deactivation synchronization mechanism. Reader lock is acquired when activation/deactivation is pending (i.e. until completed) and writer lock by processes which require not to be run until activation/deactivation is in progress.

Referenced by initialize(), internalDeactivateComponent(), internalReleaseComponent(), internalRequestComponent(), and internalRestartComponent().

Activation/deactivation synchronization mechanism.

Referenced by acquireSynchronizationObject(), initialize(), and releaseSynchronizationObject().

Persistent set of raised (timer task) alarms.

Referenced by alarmCleared(), alarmRaised(), getActiveAlarms(), and hasActiveAlarm().

Alarm System Interface.

Referenced by containerLogin(), initialize(), initializePingTasks(), and reportPrevaylerState().

CDB access.

Referenced by createDAO(), and refreshComponentsList().

CDB component specification. If non-null CDB will be automatically activated on container login.

Referenced by containerPostLoginActivation(), and initialize().

Queue (per client) for its messages.

Referenced by initialize(), and sendMessage().

Cached list of all component entries in the CDB.

Referenced by getComponentsDAOProxy(), and getComponentsList().

Container rights.

Referenced by securityCheck().

New container logged in notification.

Referenced by containerPostLoginActivation(), initialize(), and internalNoSyncStartUpContainer().

Containers DAO dao (access to the CDB).

Referenced by autoStartComponents(), destroyContainersDAOProxy(), and getContainersDAOProxy().

final String com::cosylab::acs::maci::manager::ManagerImpl::CURL_URI_SCHEMA = "curl://" [static, private]

Default manager domain.

Map of default components (set via getDynamicComponent) overriding CDB state. Entry is: (String type, String name).

Referenced by getCollocatedComponent(), getDefaultComponents(), getDynamicComponent(), and internalRequestDefaultComponent().

HashSet com::cosylab::acs::maci::manager::ManagerImpl::domains = new HashSet() [private]

List of domains to manage.

Referenced by checkCURL(), finalizeFederation(), initializeFederation(), and isLocalDomainCURL().

Handle monitoring flag.

Referenced by logHandleRelease(), and readManagerConfiguration().

Referenced by reportPrevaylerState().

final String com::cosylab::acs::maci::manager::ManagerImpl::FAULT_FAMILY = "Manager" [static, protected]

Referenced by reportPrevaylerState().

final String com::cosylab::acs::maci::manager::ManagerImpl::FAULT_MEMBER = "Prevayler" [static, protected]

Referenced by reportPrevaylerState().

Root context of the federation directory.

Referenced by finalizeFederation(), getManagerForDomain(), and initializeFederation().

Federation enabled flag.

Referenced by finalizeFederation(), and initializeFederation().

Interdomain manager handle mask.

Referenced by getComponentInfo(), internalNoSyncDeactivateComponent(), and internalNoSyncRequestComponent().

Last execution id;

Referenced by generateExecutionId().

Load balancing strategy.

Referenced by checkLoadBalancingStrategy(), and internalRequestDynamicComponent().

Logger.

Referenced by administratorLogin(), administratorLogout(), autoStartComponents(), bind(), checkLoadBalancingStrategy(), cleanupEmptyFContext(), clientLogin(), clientLogout(), containerInternalStateMerge(), containerLogin(), containerLogout(), containerPostLoginActivation(), createDAO(), destroyDAO(), forceReleaseComponent(), getCollocatedComponent(), getComponent(), getComponentInfo(), getComponentNonSticky(), getDefaultComponent(), getDynamicComponent(), getDynamicComponents(), initializeFederation(), initializePingTasks(), initializeServiceDaemons(), internalNoSyncDeactivateComponent(), internalNoSyncReleaseComponent(), internalNoSyncRequestComponent(), internalNoSyncRestartComponent(), internalNoSyncStartUpContainer(), internalRequestComponent(), internalRequestDefaultComponent(), isServiceComponent(), login(), logout(), lookup(), makeComponentImmortal(), notifyClientDisconnectShutdown(), notifyClientLogin(), notifyClientLogout(), notifyComponentActivated(), notifyComponentAvailable(), notifyComponentDeactivated(), notifyComponentReleased(), notifyComponentRequested(), notifyComponentUnavailable(), notifyContainerDisconnectShutdown(), notifyContainerLogin(), notifyContainerLogout(), notifyContainerShutdownOrder(), rebind(), refreshComponentsList(), registerComponent(), releaseComponent(), releaseComponents(), reportException(), reportPrevaylerState(), restartComponent(), com::cosylab::acs::maci::manager::ManagerImpl::ClientMessageTask::run(), com::cosylab::acs::maci::manager::ManagerImpl::RequestComponentTask::run(), shutdown(), unbind(), and unregisterComponent().

Cache of non-local (federated) managers.

Referenced by getManagerForDomain(), and initialize().

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_CDB_COMPONENTSPEC = "ACS.CDBComponentSpec" [static, private]

CDB component specification system property name.

Referenced by initialize().

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_CDB_DISABLE = "ACS.disableCDB" [static, private]

CDB disable system property name.

Referenced by getComponentsDAOProxy(), getContainersDAOProxy(), and getManagerDAOProxy().

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_DOMAIN_DIRECTORY = "ACS.federationDirectory" [static, private]

Manager federation central naming service.

Referenced by initializeFederation().

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_DOMAIN_LIST = "ACS.domains" [static, private]

Manager federation domain list property name.

Referenced by initializeFederation().

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_HANDLE_MONITORING = "manager.debug.rememberOldHandles" [static, private]

Enable handle monitoring property name.

Referenced by readManagerConfiguration().

final String com::cosylab::acs::maci::manager::ManagerImpl::NAME_LOAD_BALANCING_STRATEGY = "ACS.LoadBalancingStrategy" [static, private]

Load balancing strategy system property name.

Referenced by checkLoadBalancingStrategy().

Referenced by shutdown().

Referenced by shutdown().

List of all pending activations. Needed for cyclid dependency checks, since non-fuly-activasted components are not accessible via HandleDataStore iterator.

Referenced by checkCyclicDependency(), initialize(), and internalNoSyncRequestComponent().

List of all pending container shutdowns.

Referenced by checkContainerShutdownState(), initialize(), and shutdownContainer().

Number of threads in thread pool (guarantees order of execution).

Referenced by initialize(), initializeDefaultConfiguration(), and readManagerConfiguration().

transient Prevayler com::cosylab::acs::maci::manager::ManagerImpl::prevayler = null [private]

Implementation of prevayler system.

Referenced by executeCommand(), and internalNoSyncRequestComponent().

transient volatile AtomicBoolean com::cosylab::acs::maci::manager::ManagerImpl::prevaylerAlarmState [private]

Prevayler state.

Referenced by initialize(), and reportPrevaylerState().

transient Random com::cosylab::acs::maci::manager::ManagerImpl::random = null [private]

Handle data store to monitor released handles.

Referenced by getHandleReleaseLog(), and logHandleRelease().

Root context of the remote directory.

Referenced by bind(), getRemoteDirectory(), initialize(), lookup(), and unbind().

final ObjectStreamField [] com::cosylab::acs::maci::manager::ManagerImpl::serialPersistentFields [static, private]
Initial value:
 {
                        new ObjectStreamField("domain", String.class),
                        new ObjectStreamField("handle", Integer.TYPE),
                        new ObjectStreamField("clients", HandleDataStore.class),
                        new ObjectStreamField("administrators", HandleDataStore.class),
                        new ObjectStreamField("containers", HandleDataStore.class),
                        new ObjectStreamField("components", HandleDataStore.class),
                        new ObjectStreamField("releasedHandles", Map.class),
                        new ObjectStreamField("unavailableComponents", Map.class),
                                                new ObjectStreamField("defaultComponents", Map.class),
                                                new ObjectStreamField("domains", HashSet.class),
                                        new ObjectStreamField("activeAlarms", HashSet.class)}

All fields that represent state of the Manager must be listed here. Those fields will be written to and read from persistence storage

final long com::cosylab::acs::maci::manager::ManagerImpl::serialVersionUID = 1372046383416324709L [static, private]

Serial versionUID

Shutdown implementation.

Referenced by getShutdownImplementation(), and shutdown().

transient ThreadPoolExecutor com::cosylab::acs::maci::manager::ManagerImpl::threadPool [private]
transient SimpleDateFormat com::cosylab::acs::maci::manager::ManagerImpl::timeFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS") [static, private]

ISO 8601 date formatter.

Referenced by securityCheck().

Implementation of transport helper.

Referenced by initializeServiceDaemons(), and internalNoSyncStartUpContainer().


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

Generated by  doxygen 1.6.2