#include <MockManager.h>
Public Member Functions | |
MockManager (void) | |
virtual maci::ClientInfo * | login (maci::Client_ptr reference) |
virtual void | logout (maci::Handle id) |
virtual ::maci::Handle | register_component (maci::Handle id, const char *component_url, const char *type, CORBA::Object_ptr c) |
virtual void | unregister_component (maci::Handle id, maci::Handle h) |
virtual CORBA::Object_ptr | get_service (maci::Handle id, const char *service_url, CORBA::Boolean activate) |
virtual ::CORBA::Object_ptr | get_component (maci::Handle id, const char *service_url, CORBA::Boolean activate) |
virtual ::CORBA::Object_ptr | get_component_non_sticky (maci::Handle id, const char *component_url) |
virtual ::maci::ObjectSeq * | get_services (maci::Handle id, const ::maci::CURLSeq &service_urls, CORBA::Boolean activate, maci::ulongSeq_out status) |
virtual ::maci::ObjectSeq * | get_components (maci::Handle id, const maci::CURLSeq &component_urls, CORBA::Boolean activate, maci::ulongSeq_out status) |
virtual void | make_component_immortal (maci::Handle id, const char *component_url, CORBA::Boolean immortal_state) |
virtual ::CORBA::Long | release_component (maci::Handle id, const char *component_url) |
virtual void | release_component_async (maci::Handle id, const char *component_url, ACS::CBlong_ptr cb, const ACS::CBDescIn &desc) |
virtual ::CORBA::Long | force_release_component (maci::Handle id, const char *component_url) |
virtual void | release_components (maci::Handle id, const ::maci::CURLSeq &component_urls) |
virtual void | shutdown (maci::Handle id, CORBA::ULong containers) |
virtual ::maci::ContainerInfoSeq * | get_container_info (maci::Handle id, const maci::HandleSeq &h, const char *name_wc) |
virtual maci::ClientInfoSeq * | get_client_info (maci::Handle id, const maci::HandleSeq &h, const char *name_wc) |
virtual maci::ComponentInfoSeq * | get_component_info (maci::Handle id, const maci::HandleSeq &h, const char *name_wc, const char *type_wc, CORBA::Boolean active_only) |
virtual ::CORBA::Object_ptr | restart_component (maci::Handle client, const char *component_url) |
virtual maci::ComponentInfo * | get_dynamic_component (maci::Handle client, const maci::ComponentSpec &c, CORBA::Boolean mark_as_default) |
virtual maci::ComponentInfoSeq * | get_dynamic_components (maci::Handle client, const maci::ComponentSpecSeq &components) |
virtual maci::ComponentInfo * | get_collocated_component (maci::Handle client, const maci::ComponentSpec &c, CORBA::Boolean mark_as_default, const char *target_component) |
virtual maci::ComponentInfo * | get_default_component (maci::Handle client, const char *component_type) |
virtual void | shutdown_container (maci::Handle id, const char *container_name, CORBA::ULong action) |
virtual maci::LoggingConfigurable::LogLevels | get_default_logLevels () |
virtual maci::LoggingConfigurable::LogLevels | get_logLevels (const char *) |
virtual void | set_logLevels (const char *, const maci::LoggingConfigurable::LogLevels &) |
virtual void | set_default_logLevels (const maci::LoggingConfigurable::LogLevels &) |
virtual void | refresh_logging_config () |
virtual maci::stringSeq * | get_logger_names () |
virtual char * | domain_name () |
virtual CORBA::Boolean | ping () |
maci::MockManager::MockManager | ( | void | ) | [inline] |
virtual char* maci::MockManager::domain_name | ( | ) | [inline, virtual] |
virtual ::CORBA::Long maci::MockManager::force_release_component | ( | maci::Handle | id, | |
const char * | component_url | |||
) | [inline] |
Releases a component also if still referenced by other components/clients.
virtual maci::ClientInfoSeq* maci::MockManager::get_client_info | ( | maci::Handle | id, | |
const maci::HandleSeq & | h, | |||
const char * | name_wc | |||
) | [inline, virtual] |
Get all the information that the Manager has about its current 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.
virtual maci::ComponentInfo* maci::MockManager::get_collocated_component | ( | maci::Handle | client, | |
const maci::ComponentSpec & | c, | |||
CORBA::Boolean | mark_as_default, | |||
const char * | target_component | |||
) | [inline, virtual] |
Activation of a component so that it runs in the same process as another given component.
maciErrType::IncompleteComponentSpecEx | ||
maciErrType::InvalidComponentSpecEx | ||
maciErrType::ComponentSpecIncompatibleWithActiveComponentEx | ||
maciErrType::CannotGetComponentEx |
virtual ::CORBA::Object_ptr maci::MockManager::get_component | ( | maci::Handle | id, | |
const char * | service_url, | |||
CORBA::Boolean | activate | |||
) | [inline] |
Get a component, activating it if necessary. The client represented by id (the handle) must have adequate access rights to access the component.
maciErrType::CannotGetComponentEx | ||
maciErrType::ComponentNotAlreadyActivatedEx | ||
maciErrType::ComponentConfigurationNotFoundEx |
virtual maci::ComponentInfoSeq* maci::MockManager::get_component_info | ( | maci::Handle | id, | |
const maci::HandleSeq & | h, | |||
const char * | name_wc, | |||
const char * | type_wc, | |||
CORBA::Boolean | active_only | |||
) | [inline, virtual] |
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.
virtual ::CORBA::Object_ptr maci::MockManager::get_component_non_sticky | ( | maci::Handle | id, | |
const char * | component_url | |||
) | [inline] |
Get a non-sticky reference to a component.
A non-sticky reference does not bind the Manager to keep alive the Component and the Client requesting for a non-sticky references is not considered when checking for reference counts. The Manager can deactivate Components independently from any non-sticky reference.
This is typically used by "weak clients" like graphical user interfaces.
Since a non-sticky reference is not considered in reference counting, it will also not activate the component if it is not already active.
As a consequence, asking for a non-sticky reference to a not-active Component throws an exception.
The client represented by id (the handle) must have adequate access rights to access the component.
maciErrType::CannotGetComponentEx | ||
maciErrType::ComponentNotAlreadyActivatedEx |
virtual ::maci::ObjectSeq* maci::MockManager::get_components | ( | maci::Handle | id, | |
const maci::CURLSeq & | component_urls, | |||
CORBA::Boolean | activate, | |||
maci::ulongSeq_out | status | |||
) | [inline] |
Used for retrieving several components with one call. See get_component.
maciErrType::CannotGetComponentEx |
virtual ::maci::ContainerInfoSeq* maci::MockManager::get_container_info | ( | maci::Handle | id, | |
const maci::HandleSeq & | h, | |||
const char * | name_wc | |||
) | [inline] |
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.
virtual maci::ComponentInfo* maci::MockManager::get_default_component | ( | maci::Handle | client, | |
const char * | component_type | |||
) | [inline, virtual] |
Returns the default component of specific type.
maciErrType::NoDefaultComponentEx | ||
maciErrType::CannotGetComponentEx |
virtual maci::LoggingConfigurable::LogLevels maci::MockManager::get_default_logLevels | ( | ) | [inline, virtual] |
virtual maci::ComponentInfo* maci::MockManager::get_dynamic_component | ( | maci::Handle | client, | |
const maci::ComponentSpec & | c, | |||
CORBA::Boolean | mark_as_default | |||
) | [inline, virtual] |
Activation of dynamic component.
maciErrType::IncompleteComponentSpecEx | ||
maciErrType::InvalidComponentSpecEx | ||
maciErrType::ComponentSpecIncompatibleWithActiveComponentEx | ||
maciErrType::CannotGetComponentEx |
virtual maci::ComponentInfoSeq* maci::MockManager::get_dynamic_components | ( | maci::Handle | client, | |
const maci::ComponentSpecSeq & | components | |||
) | [inline, virtual] |
Group request of dynamic components.
maciErrType::IncompleteComponentSpecEx | ||
maciErrType::InvalidComponentSpecEx | ||
maciErrType::ComponentSpecIncompatibleWithActiveComponentEx | ||
maciErrType::CannotGetComponentEx |
virtual maci::stringSeq* maci::MockManager::get_logger_names | ( | ) | [inline, virtual] |
virtual maci::LoggingConfigurable::LogLevels maci::MockManager::get_logLevels | ( | const char * | ) | [inline, virtual] |
virtual CORBA::Object_ptr maci::MockManager::get_service | ( | maci::Handle | id, | |
const char * | service_url, | |||
CORBA::Boolean | activate | |||
) | [virtual] |
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.
maciErrType::CannotGetComponentEx | ||
maciErrType::ComponentNotAlreadyActivatedEx | ||
maciErrType::ComponentConfigurationNotFoundEx |
virtual ::maci::ObjectSeq* maci::MockManager::get_services | ( | maci::Handle | id, | |
const ::maci::CURLSeq & | service_urls, | |||
CORBA::Boolean | activate, | |||
maci::ulongSeq_out | status | |||
) | [inline] |
Used for retrieving several services with one call. See get_service.
maciErrType::CannotGetServiceEx |
virtual maci::ClientInfo* maci::MockManager::login | ( | maci::Client_ptr | reference | ) | [inline, virtual] |
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.
virtual void maci::MockManager::logout | ( | maci::Handle | id | ) | [inline, virtual] |
Logout from MACI.
virtual void maci::MockManager::make_component_immortal | ( | maci::Handle | id, | |
const char * | component_url, | |||
CORBA::Boolean | immortal_state | |||
) | [inline, virtual] |
Change mortality state of an component. Component must be already active, otherwise CORBA::NO_RESOURCE exception will be thrown. The caller must be an owner of an component or have administator rights, otherwise CORBA::NO_PERMISSION exception will be thrown.
virtual CORBA::Boolean maci::MockManager::ping | ( | ) | [inline, virtual] |
virtual void maci::MockManager::refresh_logging_config | ( | ) | [inline, virtual] |
virtual ::maci::Handle maci::MockManager::register_component | ( | maci::Handle | id, | |
const char * | component_url, | |||
const char * | type, | |||
CORBA::Object_ptr | c | |||
) | [inline] |
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.
maciErrType::CannotRegisterComponentEx |
virtual ::CORBA::Long maci::MockManager::release_component | ( | maci::Handle | id, | |
const char * | component_url | |||
) | [inline] |
Release a component. In order for this operation to be possible, the caller represented by the id must have previously successfuly 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.
virtual void maci::MockManager::release_component_async | ( | maci::Handle | id, | |
const char * | component_url, | |||
ACS::CBlong_ptr | cb, | |||
const ACS::CBDescIn & | desc | |||
) | [inline, virtual] |
virtual void maci::MockManager::release_components | ( | maci::Handle | id, | |
const ::maci::CURLSeq & | component_urls | |||
) | [inline, virtual] |
Release components.
virtual ::CORBA::Object_ptr maci::MockManager::restart_component | ( | maci::Handle | client, | |
const char * | component_url | |||
) | [inline] |
Restarts a component.
maciErrType::CannotGetComponentEx |
virtual void maci::MockManager::set_default_logLevels | ( | const maci::LoggingConfigurable::LogLevels & | ) | [inline, virtual] |
virtual void maci::MockManager::set_logLevels | ( | const char * | , | |
const maci::LoggingConfigurable::LogLevels & | ||||
) | [inline, virtual] |
virtual void maci::MockManager::shutdown | ( | maci::Handle | id, | |
CORBA::ULong | containers | |||
) | [inline, virtual] |
Shutdown the Manager.
Warning: This call will also deactivate all components active in the system, including startup and immortal components.
virtual void maci::MockManager::shutdown_container | ( | maci::Handle | id, | |
const char * | container_name, | |||
CORBA::ULong | action | |||
) | [inline, virtual] |
Shutdown a container.
virtual void maci::MockManager::unregister_component | ( | maci::Handle | id, | |
maci::Handle | h | |||
) | [inline, virtual] |
Unregister a component from the Manager.
maciErrType::CannotUnregisterComponentEx |