Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

# CIAO::ServerActivator_Impl Class Reference

Servant implementation for Components::Deployment::ServerActivator. More...

`#include <ServerActivator_Impl.h>`

Collaboration diagram for CIAO::ServerActivator_Impl:

[legend]
List of all members.

## Public Member Functions
| ServerActivator_Impl (CORBA::ORB_ptr o, PortableServer::POA_ptr p)
| Constructor.
virtual | ~ServerActivator_Impl (void)
| Destructor.
virtual PortableServer::POA_ptr | _default_POA (void)
int | init (const char *server_location, CORBA::ULong delay, const char *installation_ior, const char *default_svcconf, const char *svcconf_map_file, const char *extra_cmdline_flags ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
virtual Components::Deployment::ComponentServer_ptr | create_component_server (const Components::ConfigValues &config ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Components::CreateFailure, Components::InvalidConfiguration)
| Components::Deployment::ServerActivator defined attributes/operations.
virtual void | remove_component_server (Components::Deployment::ComponentServer_ptr server ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Components::RemoveFailure)
virtual Components::Deployment::ComponentServers * | get_component_servers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
Components::Deployment::ServerActivator_ptr | _ciao_get_objref (void)
const char * | _ciao_get_ior (void)
## Protected Types
typedef CIAO::ServerActivator_Impl::CS_config | CompServ_Config_Info
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, ACE_CString, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | SVCCONF_MAP
## Protected Member Functions
int | init_svcconf_map (const char *map_file)
const char * | lookup_svcconf_pathname (const char *hint) const
void | parse_config_value (const Components::ConfigValues &options, CompServ_Config_Info &config_info ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Components::InvalidConfiguration)
## Protected Attributes
CORBA::String_var | server_path_
| location of the ComponentServer.
CORBA::ORB_var | orb_
| Keep a pointer to the managing ORB serving this servant.
PortableServer::POA_var | poa_
| Keep a pointer to the managing POA.
PortableServer::POA_var | callback_poa_
| Child poa that uses active object map.
CORBA::String_var | installation_ior_
| Cached the IOR string to ComponentInstallation Interface.
CORBA::ULong | spawn_delay_
Components::Deployment::ServerActivator_var | objref_
| Cache a object reference to this servant.
CORBA::String_var | ior_
| Cache the ior of the previous reference.
TAO_SYNCH_MUTEX | lock_
| Synchronize access to the object set.
ACE_CString | default_svcconf_file_
| Default svc.conf filename.
ACE_CString | extra_flags_
| Extra command line flags.
SVCCONF_MAP | svc_conf_map_
| Map of (canonical svc.conf id, svc.conf) mapping.
Object_Set< Components::Deployment::ComponentServer, Components::Deployment::ComponentServer_var > | cs_set_
| Keep a list of managed ComponentServer objects.

## Detailed Description

Servant implementation for Components::Deployment::ServerActivator.

This class implements the Components::Deployment::ServerActivator interface as defined by the CCM spcification. As the interface implies, this is actually part of the deployment interface and is used to manage the lifecycle of containers running on the server.

## Member Typedef Documentation

typedef struct CIAO::ServerActivator_Impl::CS_config CIAO::ServerActivator_Impl::CompServ_Config_Info`[protected]`

| Contains the information extracted from create_component_server's ConfigValue argument that ServerActivation cares.

typedef ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> CIAO::ServerActivator_Impl::SVCCONF_MAP`[protected]`

## Constructor & Destructor Documentation

ACE_INLINE CIAO::ServerActivator_Impl::ServerActivator_Impl | ( | CORBA::ORB_ptr | o,
|  | PortableServer::POA_ptr | p
| ) |

| Constructor.

CIAO::ServerActivator_Impl::~ServerActivator_Impl | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

ACE_INLINE const char * CIAO::ServerActivator_Impl::_ciao_get_ior | ( | void |  | ) |

ACE_INLINE::Components::Deployment::ServerActivator_ptr CIAO::ServerActivator_Impl::_ciao_get_objref | ( | void |  | ) |

| Return the cached ServerActivator object reference. Do not release this object reference, or put it into an var.

PortableServer::POA_ptr CIAO::ServerActivator_Impl::_default_POA | ( | void |  | ) | `[virtual]`

| Get the containing POA. This operation does *not* increase the reference count of the POA.

Components::Deployment::ComponentServer_ptr CIAO::ServerActivator_Impl::create_component_server | ( | const Components::ConfigValues &config | ACE_ENV_ARG_DECL_WITH_DEFAULTS | ) | throw (CORBA::SystemException, Components::CreateFailure, Components::InvalidConfiguration)`[virtual]`

| Components::Deployment::ServerActivator defined attributes/operations.

Components::Deployment::ComponentServers * CIAO::ServerActivator_Impl::get_component_servers | ( | ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS |  | ) | throw (CORBA::SystemException)`[virtual]`

int CIAO::ServerActivator_Impl::init | ( | const char * | server_location,
|  | CORBA::ULong | delay,
|  | const char * | installation_ior,
|  | const char * | default_svcconf,
|  | const char * | svcconf_map_file,
|  | const char *extra_cmdline_flags | ACE_ENV_ARG_DECL_WITH_DEFAULTS
| ) | throw (CORBA::SystemException)

  | Initialize the ServerActivator. The currently implementation of ServerActivator can only activate CIAO's own ComponentServer processes. You should specify the location (pathname) of the ComponentServer and the delay ServerActivator should wait (in second) for ComponentServer to call back. Parameters:
  | server_location | A null-termiated char * string pointing to the pathname of a ComponentServer executable.
  | delay | instructs how long (in second) a ServerActivator should wait for a newly spawned ComponentServer to pass back its IOR.
  | installation_ior | A null-terminated char * string pointing to the stringified IOR of a ComponentInstallation that ComponentServer can use to location component implementation DLL.
  | default_svcconf | A null-terminated char * string pointing to the pathname of the default svcconf file a ComponentServer should use (specified using -ORBSvcConfFile) if no hint is given.
  | svcconf_map_file | A null-terminated char * string pointing to the pathname of a (hint, svcconf pathname) map.

int CIAO::ServerActivator_Impl::init_svcconf_map | ( | const char * | map_file | ) | `[protected]`

| Initialize svc_conf_map_ with the supplied filename.

const char * CIAO::ServerActivator_Impl::lookup_svcconf_pathname | ( | const char * | hint | ) | const`[protected]`

| Returns the pathname to the effective svc.conf file based on "hint." It may return the default svc.conf file when there's no hint (hint == 0) and we do have a default svc.conf path.

void CIAO::ServerActivator_Impl::parse_config_value | ( | const Components::ConfigValues & | options,
|  | CompServ_Config_Info &config_info | ACE_ENV_ARG_DECL_WITH_DEFAULTS
| ) | throw (CORBA::SystemException, Components::InvalidConfiguration)`[protected]`

| Parse the ConfigValue arguement of the function create_component_server and extractg the information into

void CIAO::ServerActivator_Impl::remove_component_server | ( | Components::Deployment::ComponentServer_ptr server | ACE_ENV_ARG_DECL_WITH_DEFAULTS | ) | throw (CORBA::SystemException, Components::RemoveFailure)`[virtual]`

## Member Data Documentation

PortableServer::POA_var CIAO::ServerActivator_Impl::callback_poa_`[protected]`

| Child poa that uses active object map.

Object_Set<Components::Deployment::ComponentServer, Components::Deployment::ComponentServer_var> CIAO::ServerActivator_Impl::cs_set_`[protected]`

| Keep a list of managed ComponentServer objects.

ACE_CString CIAO::ServerActivator_Impl::default_svcconf_file_`[protected]`

| Default svc.conf filename.

ACE_CString CIAO::ServerActivator_Impl::extra_flags_`[protected]`

| Extra command line flags.

CORBA::String_var CIAO::ServerActivator_Impl::installation_ior_`[protected]`

| Cached the IOR string to ComponentInstallation Interface.

CORBA::String_var CIAO::ServerActivator_Impl::ior_`[protected]`

| Cache the ior of the previous reference.

TAO_SYNCH_MUTEX CIAO::ServerActivator_Impl::lock_`[protected]`

| Synchronize access to the object set.

Components::Deployment::ServerActivator_var CIAO::ServerActivator_Impl::objref_`[protected]`

| Cache a object reference to this servant.

CORBA::ORB_var CIAO::ServerActivator_Impl::orb_`[protected]`

| Keep a pointer to the managing ORB serving this servant.

PortableServer::POA_var CIAO::ServerActivator_Impl::poa_`[protected]`

| Keep a pointer to the managing POA.

CORBA::String_var CIAO::ServerActivator_Impl::server_path_`[protected]`

| location of the ComponentServer.

CORBA::ULong CIAO::ServerActivator_Impl::spawn_delay_`[protected]`

| Specify the time in second ServerActivator will wait for a child ComponentServer to callback. Default is 5 second.

SVCCONF_MAP CIAO::ServerActivator_Impl::svc_conf_map_`[protected]`

| Map of (canonical svc.conf id, svc.conf) mapping.

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

- ServerActivator_Impl.h
- ServerActivator_Impl.cpp
- ServerActivator_Impl.inl