Inherits si::ijs::maci::ManagerPOA.
Public Member Functions | |
ManagerProxyImpl (Manager manager, Logger logger) | |
boolean | ping () |
String | domain_name () |
ContainerInfo[] | get_container_info (int id, int[] h, String name_wc) throws NoPermissionEx |
ClientInfo[] | get_client_info (int id, int[] h, String name_wc) throws NoPermissionEx |
ComponentInfo[] | get_component_info (int id, int[] h, String name_wc, String type_wc, boolean active_only) throws NoPermissionEx |
Object | get_component (int id, String component_url, boolean activate) throws NoPermissionEx, CannotGetComponentEx, ComponentNotAlreadyActivatedEx, ComponentConfigurationNotFoundEx |
Object | get_component_non_sticky (int id, String component_url) throws NoPermissionEx, CannotGetComponentEx, ComponentNotAlreadyActivatedEx |
ClientInfo | login (Client reference) throws NoPermissionEx |
void | logout (int id) throws NoPermissionEx |
int | register_component (int id, String component_url, String type, Object component) throws NoPermissionEx, CannotRegisterComponentEx |
void | make_component_immortal (int id, String component_url, boolean immortal_state) throws NoPermissionEx, ComponentNotAlreadyActivatedEx |
void | release_component_async (int id, String component_url, CBlong callback, CBDescIn desc) throws NoPermissionEx |
int | release_component (int id, String component_url) throws CannotDeactivateComponentEx, ComponentDeactivationUncleanEx, ComponentDeactivationFailedEx, NoPermissionEx |
int | force_release_component (int id, String component_url) throws NoPermissionEx |
void | shutdown (int id, int containers) |
void | unregister_component (int id, int h) throws NoPermissionEx |
ComponentInfo | get_default_component (int id, String type) throws NoPermissionEx, NoDefaultComponentEx, CannotGetComponentEx |
ComponentInfo | get_dynamic_component (int id, si.ijs.maci.ComponentSpec c, boolean mark_as_default) throws NoPermissionEx, IncompleteComponentSpecEx, InvalidComponentSpecEx, ComponentSpecIncompatibleWithActiveComponentEx, CannotGetComponentEx |
ComponentInfo | get_collocated_component (int id, si.ijs.maci.ComponentSpec c, boolean mark_as_default, String target_component) throws NoPermissionEx, IncompleteComponentSpecEx, InvalidComponentSpecEx, ComponentSpecIncompatibleWithActiveComponentEx, CannotGetComponentEx |
Object | get_service (int id, String service_url, boolean activate) throws NoPermissionEx, CannotGetComponentEx |
Object | restart_component (int id, String component_url) throws NoPermissionEx |
void | shutdown_container (int id, String container_name, int action) throws NoPermissionEx |
LogLevels | get_default_logLevels () |
void | set_default_logLevels (LogLevels levels) throws IllegalArgumentEx |
String[] | get_logger_names () |
LogLevels | get_logLevels (String logger_name) |
void | set_logLevels (String logger_name, LogLevels levels) throws IllegalArgumentEx |
void | refresh_logging_config () |
int | getNumberOfPendingRequests () |
String | toString () |
Static Public Member Functions | |
static int | mapAccessRights (int accessRights) |
Manager is the central point of interaction between the components and the clients that request MACI services. A Manager is responsible for managing a domain. Manager has the following functionality:
This class implements the IDL interface of Manager and acts like a proxy, by delegating all requests to an implementation of the com.cosylab.acs.maci.Manager interface.
com.cosylab.acs.maci.plug.ManagerProxyImpl.ManagerProxyImpl | ( | Manager | manager, | |
Logger | logger | |||
) |
Construct a new Manager which will manager
implementation.
manager | implementation of the manager, non-null . | |
logger | logger. |
String com.cosylab.acs.maci.plug.ManagerProxyImpl.domain_name | ( | ) |
Return the fully qualified name of the domain, e.g., "antenna1.alma.nrao".
References com.cosylab.acs.maci.Manager.getDomain().
int com.cosylab.acs.maci.plug.ManagerProxyImpl.force_release_component | ( | int | id, | |
String | component_url | |||
) | throws NoPermissionEx |
Forcefully release a Component.
id | Identification of the caller. | |
component_url | The CURL of the Component to be released. |
References com.cosylab.acs.maci.Manager.forceReleaseComponent().
ClientInfo [] com.cosylab.acs.maci.plug.ManagerProxyImpl.get_client_info | ( | int | id, | |
int[] | h, | |||
String | name_wc | |||
) | throws NoPermissionEx |
Get all the information that the Manager has about its known clients. To invoke this method, the caller must have INTROSPECT_MANAGER access rights, or it must be the object whose info it is requesting. Calling this function does not affect the internal state of the Manager.
id | Identification of the caller. | |
h | Handles of the clients whose information is requested. If this is an empty sequence, the name_wc parameter is used. | |
name_wc | Wildcard that the clients's name must match in order for its information to be returned. |
References com.cosylab.acs.maci.Manager.getClientInfo(), and com.cosylab.acs.maci.plug.ManagerProxyImpl.mapAccessRights().
ComponentInfo com.cosylab.acs.maci.plug.ManagerProxyImpl.get_collocated_component | ( | int | id, | |
si.ijs.maci.ComponentSpec | c, | |||
boolean | mark_as_default, | |||
String | target_component | |||
) | throws NoPermissionEx, IncompleteComponentSpecEx, InvalidComponentSpecEx, ComponentSpecIncompatibleWithActiveComponentEx, CannotGetComponentEx |
Activation of an co-deployed component.
id | identification of the caller. | |
c | component to be obtained. | |
mark_as_default | mark component as default component of its type. | |
target_component | target co-deployed component. |
ComponentInfo
of requested co-deployed component. si.ijs.maci.COMPONENT_SPEC_ANY -> ComponentSpec.COMPSPEC_ANY
References com.cosylab.acs.maci.Manager.getCollocatedComponent(), com.cosylab.acs.maci.ComponentInfo.getComponent(), com.cosylab.acs.maci.Component.getObject(), and com.cosylab.acs.maci.plug.ManagerProxyImpl.mapAccessRights().
Object com.cosylab.acs.maci.plug.ManagerProxyImpl.get_component | ( | int | id, | |
String | component_url, | |||
boolean | activate | |||
) | throws NoPermissionEx, CannotGetComponentEx, ComponentNotAlreadyActivatedEx, ComponentConfigurationNotFoundEx |
Get a Component, activating it if necessary. The client represented by id (the handle) must have adequate access rights to access the Component. This is untrue of components: components always have unlimited access rights to other components.
id | Identification of the caller. If this is an invalid handle, or if the caller does not have enough access rights, a maciErrType.NoPermissionEx exception is raised. | |
component_url | CURL of the Component whose reference is to be retrieved. | |
activate | True if the Component is to be activated in case it does not exist. If set to False, and the Component does not exist, a nil reference is returned and status is set to COMPONENT_NOT_ACTIVATED. |
References com.cosylab.acs.maci.Manager.getComponent(), and com.cosylab.acs.maci.Component.getObject().
ComponentInfo [] com.cosylab.acs.maci.plug.ManagerProxyImpl.get_component_info | ( | int | id, | |
int[] | h, | |||
String | name_wc, | |||
String | type_wc, | |||
boolean | active_only | |||
) | throws NoPermissionEx |
Get all the information that the Manager has about components. To invoke this method, the caller must have INTROSPECT_MANAGER access rights, or it must have adequate privileges to access the Component (the same as with the get_component method). Information about all components is returned, unless the active_only parameter is set to true, in which case only information about those components that are currently registered with the Manager and activated is returned. Calling this function does not affect the internal state of the Manager.
id | Identification of the caller. | |
h | Handles of the components whose information is requested. If this is an empty sequence, the name_wc and type_wc parameters are used. | |
name_wc | Wildcard that the Component's name must match in order for its information to be returned. | |
type_wc | Wildcard that the Component's type must match in order for its information to be returned. | |
active_only |
References com.cosylab.acs.maci.Manager.getComponentInfo(), com.cosylab.acs.maci.ComponentInfo.getInterfaces(), and com.cosylab.acs.maci.plug.ManagerProxyImpl.mapAccessRights().
Object com.cosylab.acs.maci.plug.ManagerProxyImpl.get_component_non_sticky | ( | int | id, | |
String | component_url | |||
) | throws NoPermissionEx, CannotGetComponentEx, ComponentNotAlreadyActivatedEx |
Get a component, do not activate it and also do not do any reference counting. The client represented by id (the handle) must have adequate access rights to access the Component. This is untrue of components: components always have unlimited access rights to other components.
id | Identification of the caller. If this is an invalid handle, or if the caller does not have enough access rights, a maciErrType.NoPermissionEx exception is raised. | |
component_url | CURL of the Component whose reference is to be retrieved. |
References com.cosylab.acs.maci.Manager.getComponentNonSticky(), and com.cosylab.acs.maci.Component.getObject().
ContainerInfo [] com.cosylab.acs.maci.plug.ManagerProxyImpl.get_container_info | ( | int | id, | |
int[] | h, | |||
String | name_wc | |||
) | throws NoPermissionEx |
Get all the information that the Manager has about its known Containers. To invoke this method, the caller must have INTROSPECT_MANAGER access rights, or it must be the object whose info it is requesting. Calling this function does not affect the internal state of the Manager.
id | Identification of the caller. | |
h | Handles of the containers whose information is requested. If this is an empty sequence, the name_wc parameter is used. | |
name_wc | Wildcard that the container's name must match in order for its information to be returned. |
References com.cosylab.acs.maci.Manager.getContainerInfo().
ComponentInfo com.cosylab.acs.maci.plug.ManagerProxyImpl.get_default_component | ( | int | id, | |
String | type | |||
) | throws NoPermissionEx, NoDefaultComponentEx, CannotGetComponentEx |
Returns the default component of specific type.
id | identification of the caller. | |
type | component type, IDL ID. |
ComponentInfo
of requested component. References com.cosylab.acs.maci.ComponentInfo.getComponent(), com.cosylab.acs.maci.Manager.getDefaultComponent(), com.cosylab.acs.maci.Component.getObject(), and com.cosylab.acs.maci.plug.ManagerProxyImpl.mapAccessRights().
LogLevels com.cosylab.acs.maci.plug.ManagerProxyImpl.get_default_logLevels | ( | ) |
Gets the log levels of the default logging configuration. These levels are used by all loggers that have not been configured individually.
References alma.acs.logging.config.LogConfig.getDefaultMinLogLevel(), and alma.acs.logging.config.LogConfig.getDefaultMinLogLevelLocal().
ComponentInfo com.cosylab.acs.maci.plug.ManagerProxyImpl.get_dynamic_component | ( | int | id, | |
si.ijs.maci.ComponentSpec | c, | |||
boolean | mark_as_default | |||
) | throws NoPermissionEx, IncompleteComponentSpecEx, InvalidComponentSpecEx, ComponentSpecIncompatibleWithActiveComponentEx, CannotGetComponentEx |
Activation of an dynamic component.
id | identification of the caller. | |
c | component to be obtained. | |
mark_as_default | mark component as default component of its type. |
ComponentInfo
of requested component. References com.cosylab.acs.maci.ComponentInfo.getComponent(), com.cosylab.acs.maci.Manager.getDynamicComponent(), com.cosylab.acs.maci.Component.getObject(), and com.cosylab.acs.maci.plug.ManagerProxyImpl.mapAccessRights().
String [] com.cosylab.acs.maci.plug.ManagerProxyImpl.get_logger_names | ( | ) |
Gets the names of all loggers, to allow configuring their levels individually. The names are those that appear in the log records in the field "SourceObject". This includes the container logger, ORB logger, component loggers, and (only C++) GlobalLogger.
References alma.acs.logging.config.LogConfig.getLoggerNames().
LogLevels com.cosylab.acs.maci.plug.ManagerProxyImpl.get_logLevels | ( | String | logger_name | ) |
Gets log levels for a particular named logger. If the returned field LogLevels.useDefault is true, then the logger uses the default levels, see get_default_logLevels(); otherwise the returned local and remote levels apply.
References alma.acs.logging.config.LogConfig.getNamedLoggerConfig(), and alma.acs.logging.config.LogConfig.hasCustomConfig().
Object com.cosylab.acs.maci.plug.ManagerProxyImpl.get_service | ( | int | id, | |
String | service_url, | |||
boolean | activate | |||
) | throws NoPermissionEx, CannotGetComponentEx |
Get a service, activating it if necessary (components). The client represented by id (the handle) must have adequate access rights to access the service. NOTE: a component is also a service, i.e. a service activated by a container.
id | Identification of the caller. If this is an invalid handle, or if the caller does not have enough access rights, a maciErrType.NoPermissionEx exception is raised. | |
service_url | CURL of the service whose reference is to be retrieved. | |
activate | True if the component is to be activated in case it does not exist. If set to False, and the Component does not exist, a nil reference is returned and status is set to COMPONENT_NOT_ACTIVATED. | |
status | Status of the request. One of COMPONENT_ACTIVATED, COMPONENT_DOES_NO_EXIST and COMPONENT_NOT_ACTIVATED. |
References com.cosylab.acs.maci.Component.getObject(), and com.cosylab.acs.maci.Manager.getService().
int com.cosylab.acs.maci.plug.ManagerProxyImpl.getNumberOfPendingRequests | ( | ) |
Returns number of pending requests.
Referenced by com.cosylab.acs.maci.manager.app.ManagerEngine.getNumberOfPendingRequests().
ClientInfo com.cosylab.acs.maci.plug.ManagerProxyImpl.login | ( | Client | reference | ) | throws NoPermissionEx |
Login to MACI. Containers, Clients and Administrative clients call this function first to identify themselves with the Manager. The Manager authenticates them (through the authenticate function), and assigns them access rights and a handle, through which they will identify themselves at subsequent calls to the Manager.
reference | A reference to the Client. |
References com.cosylab.acs.maci.Manager.login(), and com.cosylab.acs.maci.plug.ManagerProxyImpl.mapAccessRights().
void com.cosylab.acs.maci.plug.ManagerProxyImpl.logout | ( | int | id | ) | throws NoPermissionEx |
Logout from MACI.
id | Handle of the Client that is logging out |
References com.cosylab.acs.maci.Manager.logout().
void com.cosylab.acs.maci.plug.ManagerProxyImpl.make_component_immortal | ( | int | id, | |
String | component_url, | |||
boolean | immortal_state | |||
) | throws NoPermissionEx, ComponentNotAlreadyActivatedEx |
Change mortality state of an component. Compnent must be already active, otherwise ComponentNotAlreadyActivatedEx exception will be thrown. The caller must be an owner of an component or have administator rights, otherwise NoPermissionEx exception will be thrown.
id | Identification of the caller. The caller must be an owner of an component or have administator rights. | |
component_url | The CURL of the component whose mortality to change. | |
immortal_state | New mortality state. |
References com.cosylab.acs.maci.Manager.makeComponentImmortal().
static int com.cosylab.acs.maci.plug.ManagerProxyImpl.mapAccessRights | ( | int | accessRights | ) | [static] |
Map AccessRights
status codes to CORBA specific.
accessRights | access rights as defined in AccessRights |
Referenced by com.cosylab.acs.maci.plug.ManagerProxyImpl.get_client_info(), com.cosylab.acs.maci.plug.ManagerProxyImpl.get_collocated_component(), com.cosylab.acs.maci.plug.ManagerProxyImpl.get_component_info(), com.cosylab.acs.maci.plug.ManagerProxyImpl.get_default_component(), com.cosylab.acs.maci.plug.ManagerProxyImpl.get_dynamic_component(), and com.cosylab.acs.maci.plug.ManagerProxyImpl.login().
boolean com.cosylab.acs.maci.plug.ManagerProxyImpl.ping | ( | ) |
Ping method so that clients can feel good about having an alive manager.
void com.cosylab.acs.maci.plug.ManagerProxyImpl.refresh_logging_config | ( | ) |
Commands the container or manager to read in again the logging configuration from the CDB and to reconfigure the loggers accordingly. This allows for persistent changes in the logging configuration to become effective, and also for changes of more advanced parameters.
References alma.acs.logging.config.LogConfig.initialize().
int com.cosylab.acs.maci.plug.ManagerProxyImpl.register_component | ( | int | id, | |
String | component_url, | |||
String | type, | |||
Object | component | |||
) | throws NoPermissionEx, CannotRegisterComponentEx |
Register a CORBA object as a Component, assigning it a CURL and making it accessible through the Manager. The Component is treated as an immortal Component.
id | Identification of the caller. The caller must have the REGISTER_component access right to perform this operation. | |
component_url | CURL that will be assigned to the object. The CURL must be in the Manager's domain, otherwise a fundamental property of domains that one computer belongs to only one domain would be too easy to violate. | |
type | Type of the Component | |
Component | Reference to the CORBA object (Component). |
References com.cosylab.acs.maci.Manager.registerComponent().
int com.cosylab.acs.maci.plug.ManagerProxyImpl.release_component | ( | int | id, | |
String | component_url | |||
) | throws CannotDeactivateComponentEx, ComponentDeactivationUncleanEx, ComponentDeactivationFailedEx, NoPermissionEx |
Release a Component. In order for this operation to be possible, the caller represented by the id must have previously successfully requested the Component via a call to get_component. Releasing a Component more times than requesting it should be avoided, but it produces no errors.
id | Identification of the caller. The caller must have previously gotten the Component through get_component. | |
component_url | The CURL of the Component to be released. |
References com.cosylab.acs.maci.Manager.releaseComponent().
void com.cosylab.acs.maci.plug.ManagerProxyImpl.release_component_async | ( | int | id, | |
String | component_url, | |||
CBlong | callback, | |||
CBDescIn | desc | |||
) | throws NoPermissionEx |
Object com.cosylab.acs.maci.plug.ManagerProxyImpl.restart_component | ( | int | id, | |
String | component_url | |||
) | throws NoPermissionEx |
Restarts an component.
id | identification of the caller. Called has to be an owner of the component. | |
component_url | CURL of the component to be restarted. |
null
if it fails. References com.cosylab.acs.maci.Component.getObject(), and com.cosylab.acs.maci.Manager.restartComponent().
void com.cosylab.acs.maci.plug.ManagerProxyImpl.set_default_logLevels | ( | LogLevels | levels | ) | throws IllegalArgumentEx |
Sets the log levels of the default logging configuration. These levels are used by all loggers that have not been configured individually.
References alma.acs.logging.config.LogConfig.setDefaultMinLogLevel(), and alma.acs.logging.config.LogConfig.setDefaultMinLogLevelLocal().
void com.cosylab.acs.maci.plug.ManagerProxyImpl.set_logLevels | ( | String | logger_name, | |
LogLevels | levels | |||
) | throws IllegalArgumentEx |
Sets log levels for a particular named logger. If levels.useDefault is true, then the logger will be reset to using default levels; otherwise it will use the supplied local and remote levels.
References alma.acs.logging.config.LogConfig.clearNamedLoggerConfig(), and alma.acs.logging.config.LogConfig.setNamedLoggerConfig().
void com.cosylab.acs.maci.plug.ManagerProxyImpl.shutdown | ( | int | id, | |
int | containers | |||
) |
Shutdown the Manager. Warning: This call will also deactivate all components active in the system, including startup and immortal components.
id | Identification of the caller. The caller must have the SHUTDOWN_SYSTEM access right. | |
containers | The code to send to shutdown methods of all Containers. If 0, the Container's shutdown methods are not called. |
References com.cosylab.acs.maci.Manager.shutdown().
void com.cosylab.acs.maci.plug.ManagerProxyImpl.shutdown_container | ( | int | id, | |
String | container_name, | |||
int | action | |||
) | throws NoPermissionEx |
Shutdown a container.
id | identification of the caller. Called has to be an owner of the component. | |
container_name | name of the container to shutdown. | |
action | The code to send to shutdown method of the container. If 0 , the Container's disconnect methods is called instead. |
References com.cosylab.acs.maci.Manager.shutdownContainer().
String com.cosylab.acs.maci.plug.ManagerProxyImpl.toString | ( | ) |
Returns a single-line rendition of this instance into text.
void com.cosylab.acs.maci.plug.ManagerProxyImpl.unregister_component | ( | int | id, | |
int | h | |||
) | throws NoPermissionEx |
Unregister a Component from the Manager.
id | Identification of the caller. The caller must have the REGISTER_COMPONENT access right to perform this operation. | |
h | Component's handle. The Component must have been previously registered through the call to register_component. If there are clients still using this Component, a components_unavailable notification is issued to all of them, and the Component is unregistered. |
References com.cosylab.acs.maci.Manager.unregisterComponent().