| |
- Acspy.Clients.BaseClient.BaseClient(maci__POA.Client)
-
- Container(maci__POA.Container, Logging__POA.LoggingConfigurable, Acspy.Clients.BaseClient.BaseClient)
- Acspy.Common.Log.LogThrottleAlarmerBase(__builtin__.object)
-
- ContainerLogThrottleAlarmer
- Logging__POA.LoggingConfigurable(omniORB.PortableServer.Servant)
-
- Container(maci__POA.Container, Logging__POA.LoggingConfigurable, Acspy.Clients.BaseClient.BaseClient)
- maci__POA.Container(maci__POA.Client, Logging__POA.LoggingConfigurable)
-
- Container(maci__POA.Container, Logging__POA.LoggingConfigurable, Acspy.Clients.BaseClient.BaseClient)
- threading.Thread(threading._Verbose)
-
- AsyncComponentActivator
class AsyncComponentActivator(threading.Thread) |
|
This thread activates the component asynchronously by delegating to
Container#activate_component(...) |
|
- Method resolution order:
- AsyncComponentActivator
- threading.Thread
- threading._Verbose
- __builtin__.object
Methods defined here:
- __init__(self, logger, container, h, execution_id, componentName, exe, type, callback, desc)
- Constructor
Parameters:
- logger The logger
- container A reference to the container
- h is the handle the component will be given
- name is simply the components name
- exe is the name of the Python module that has to be imported for the
components implementation
- idl_type is the the IR Location for the component
- callback To callback to notify that the component has been activated
or report an error
- run(self)
Methods inherited from threading.Thread:
- __repr__(self)
- getName(self)
- isAlive(self)
- isDaemon(self)
- is_alive = isAlive(self)
- join(self, timeout=None)
- setDaemon(self, daemonic)
- setName(self, name)
- start(self)
Data descriptors inherited from threading.Thread:
- daemon
- ident
- name
Data descriptors inherited from threading._Verbose:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Container(maci__POA.Container, Logging__POA.LoggingConfigurable, Acspy.Clients.BaseClient.BaseClient) |
|
The Python implementation of a MACI Container.
This implies it implements both the Container and Client interfaces. It is
multi-threaded and currently supports components derived from
ACSComponent, ContainerServices, and the LifeCycle classes. |
|
- Method resolution order:
- Container
- maci__POA.Container
- maci__POA.Client
- omniORB.PortableServer.Servant
- Logging__POA.LoggingConfigurable
- Acspy.Clients.BaseClient.BaseClient
Methods defined here:
- __init__(self, name)
- Constructor.
Initializes member variables and CORBA
Parameters: name is the stringified name of this container.
Raises: ???
- activateOffShoot(self, comp_name, os_corba_ref)
- Activates an OffShoot derived object.
Actually this will work on any CORBA object because its Python.
Parameters:
- comp_name is the components name.
- os_corba_ref is a reference to the Python object to become a CORBA object.
Return: a reference to the CORBA object that almost definitely needs to
be narrowed to the correct type. If anything goes wrong though, returns
None.
Raises: ???
- activate_component(self, h, exeid, name, exe, idl_type)
- Activates a component (or returns a reference to it if already exists).
Parameters:
- h is the handle the component will be given
- name is simply the components name
- exe is the name of the Python module that has to be imported for the
components implementation
- idl_type is the the IR Location for the component
Raises: CannotActivateComponentExImpl exception when invalid
Returns: a ComponentInfo structure for manager to use.
activate_component(in Handle h,in string name,in string exe,in string idl_type)
- activate_component_async(self, h, execution_id, name, exe, type, callback, desc)
- Activates a component asynchronously.
Parameters:
- h is the handle the component will be given
- name is simply the components name
- exe is the name of the Python module that has to be imported for the
components implementation
- idl_type is the the IR Location for the component
- callback To callback to notify that the component has been activated
or report an error
- configCORBA(self)
- configCORBA is a helper method responsible for initializing the ORB,
POAs, etc.
Parameters: None
Return: None
Raises: ???
- configureComponentLogger(self, name)
- Configure the logger for the given component name from the values in the CDB.
Parameters:
name is the name of the component
- createPOAForComponent(self, comp_name)
- Creates a new POA that is responsible for exactly one component and
the new POA is created as a child of the ComponentPOA.
Parameters: comp_name is the components stringified name.
Return: a new POA.
Raises: ???
- deactivate_component(self, handle)
- Deactivate all components whose handles are given.
Deactivation is the inverse process of activation: component is detached from
the POA, and thus made unavailable through CORBA, and its resources are
freed. If its code-base is no longer used, it is unloaded from memory.
Parameters: handle, specifies a component handle
void deactivate_component (in Handle h)
- destroyCORBA(self)
- Helper function designed to shutdown/destroy all CORBA associated with
this specific container.
Raises: ???
- disconnect(self)
- Disconnect from manager.
oneway void disconnect ();
The container overrides BaseClient.disconnect() because it tries
to reconnect to the manager.
- failedActivation(self, comp_entry)
- Helper method used to destroy various things if the component cannot
be created.
Mutual exclusion is ensured by self.activationMap that
serializes activation/deactivation of components with the same name
Parameters:
comp_entry - dictionary describing the component
- getCDBInfo(self)
- getCDBInfo is a helper method which is responsible for retrieving info
from the CDB associated with this container.
Parameters: None
Return: None
Raises: ???
- getCode(self)
- Overriden from BaseClient
- getExistingComponent(self, name)
- Searches to see if the component "name" has already been activated by
this container.
Parameters: name of the component.
Return: component record if found; else None.
- getManagerHost(self)
- Helper function returns a string consisting of managers host.
Return: hostname where manager is running.
Raises: ???
- getMyCorbaRef(self)
- Overriden from BaseClient
- get_component_info(self, handles)
- Returns information about a subset of components that are currently hosted by
the Container.
Note: If the list of handles is empty, information about all components hosted
by the activator is returned!
Parmaters: handles is a sequence of integers specifiying component handles.
Return: Information about the selected components.
ComponentInfoSeq get_component_info (in HandleSeq h);
- get_default_logLevels(self)
- Retrieve the default log levels used in this container.
Returns: Logging.LoggingConfigurable.LogLevels instance containing default log level values
Raises: Nothing
- get_handle(self)
- Returns the handle of this container given by the manager at login.
Parameters: None
Returns: handle, 0 if not (yet) logged in.
Raises: Nothing
Handle get_handle();
- get_logLevels(self, logger_name)
- Retrieve the log levels for a given component.
Parameter:
logger_name - name of the component's logger
Returns: Logging.LoggingConfigurable.LogLevels instance containing the logger's log level values
Raises: Logging.LoggerDoesNotExistEx if the logger is not active.
- get_logger_names(self)
- Retrieve the names of the currently active loggers
Returns: list of logger name strings
- handler(self, signum, frame)
- Catches SIGINTs and shuts down the container.
Used only by the run method.
Parameters: signum is the signal being caught
frame is the execution frame.
Return: None
Raises: ???
- refresh_logging_config(self)
- Reset the logging configuration to the original CDB settings.
Returns: Nothing
Raises: Nothing
- run(self)
- Runs the container until a sig-int is caught.
This is a blocking call!
Raises: ???
- sendAlarm(self, family, member, code, active)
- Raise or clear an alarm with the passed triplet
family: FaultFamily
member: FaultMember
code: FaultCode
active: if True raise the alarm otherwise clear the alarm
- setToken(self, newToken)
- Override BaseClient.setToken to handle the case of
a failure connecting to the manager
- set_component_shutdown_order(self, handles)
- Set component shutdown order.
void set_component_shutdown_order(in HandleSeq h);
- set_default_logLevels(self, levels)
- Set the default log level for this container.
Parameter:
levels - Logging.LoggingConfigurable.LogLevels instance containing default log level values
Raises: Nothing
- set_logLevels(self, logger_name, levels)
- Set the default log level for this component.
Parameter:
logger_name - name of the component's logger
levels - Logging.LoggingConfigurable.LogLevels instance containing default log level values
Raises: Logging.LoggerDoesNotExistEx if the logger is not active.
- shutdown(self, action)
- Shutdown the Container.
Normally invoked via CORBA but can also "self terminate" so to speak.
Parameters:
- action is an encrypted value that tells the container what action to take
oneway void shutdown (in unsigned long action)
- taggedmessage(self, message_type, message_id, message)
- The Manager and administrators use this method for sending textual messages
to the client.
This implementation first attempts to use the ACS logging mechanism to
display the message and if that fails for any reason, it is only sent
to standard out.
Parameters:
- message_type is an integer defined as a constant in the Client interface
- message is a string
Returns: Nothing
Raises: Nothing
oneway void message (in short message_type, in string message)
Methods inherited from Acspy.Clients.BaseClient.BaseClient:
- authenticate(self, execution_id, question)
- Authentication method. Method authenticate is the challenge issued to
the client after it tries to login. The login will be successful if the
clients authenticate() produces the expected result. Only in this case
will the Managers login method return a valid handle, which the client
will later use as the id parameter with all calls to the Manager.
Parameters: question this string does not currently matter
Return Answer - first character of the answer identifies the type of
the client, and can be one of:
- C = a regular client (implements just the Client interface).
- A = a container (implements the Container interface).
- AR = a container with recovery capability (implements the Container interface).
- S = Supervisor (implements the Administrator interface).
Raises: Nothing
string authenticate (in string question);
- components_available(self, components)
- Notify client about the change (availability) of the components currently
in use by this client. For administrative clients, notification is issued
for the change of availability of any component in the domain.
Parameters:
- components is a sequence of ComponentInfo structures
Returns: None
Raises: Nothing
oneway void components_available(in ComponentInfoSeq components)
- components_unavailable(self, component_names)
- Notify client that some of the Components currently in use by client
have become unavailable.
Parameters:
- component_names names of various unavailable components
Returns: None
Raises: Nothing
oneway void Components_unavailable (in stringSeq component_names)
- isLoggedIn(self)
- Returns True is the client is logged into the manager
and False otherwise
Parameters: None
Raises: Nothing
- managerLogin(self)
- Login into the manager
Parameters: None
Returns: The token received from the manager
Raises: CORBAProblemExImpl If the login failed
- managerLogout(self)
- Logout from manager
Parameters: None
Returns: None
Raises: Nothing
- message(self, message_type, message)
- The Manager and administrators use this method for sending textual messages
to the client.
This implementation first attempts to use the ACS logging mechanism to
display the message and if that fails for any reason, it is only sent
to standard out.
Parameters:
- message_type is an integer defined as a constant in the Client interface
- message is a string
Returns: Nothing
Raises: Nothing
oneway void message (in short message_type, in string message)
- ping(self)
- Manager pings its clients to verify they still exist.
Parameters: None
Returns: CORBA.TRUE (i.e., 1)
Raises: Nothing
boolean ping ();
|
|