CIAO::Deployment::CIAO_ServerActivator_i Class Reference

Default server activator for CIAO component servers. More...

#include <CIAO_ServerActivator_Impl.h>

Collaboration diagram for CIAO::Deployment::CIAO_ServerActivator_i:

Collaboration graph
[legend]

List of all members.

Classes

struct  _server_info
struct  Server_Info

Public Member Functions

 CIAO_ServerActivator_i (CORBA::ULong def_spawn_delay, const char *default_cs_path, const char *cs_args, bool multithreaded, CIAO::Deployment::ComponentInstallation_ptr ci, CORBA::ORB_ptr orb, PortableServer::POA_ptr poa_)
virtual ~CIAO_ServerActivator_i (void)
virtual void component_server_callback (::Components::Deployment::ComponentServer_ptr serverref, const char *server_UUID,::Components::ConfigValues_out config)
virtual void configuration_complete (const char *server_UUID)
virtual
::Components::Deployment::ComponentServer_ptr 
create_component_server (const ::Components::ConfigValues &config)
virtual void remove_component_server (::Components::Deployment::ComponentServer_ptr server)
virtual
::Components::Deployment::ComponentServers * 
get_component_servers (void)

Private Types

typedef
ACE_Refcounted_Auto_Ptr
< Server_Info, ACE_Null_Mutex
Safe_Server_Info
typedef ACE_Unbounded_Set_Ex
< Safe_Server_Info,
_server_info
SERVER_INFOS

Private Member Functions

ACE_CString construct_command_line (Server_Info &si)
pid_t spawn_component_server (const Server_Info &si, const ACE_CString &cmd_line)
void single_threaded_wait_for_callback (const Server_Info &si, ACE_Time_Value &timeout)
void multi_threaded_wait_for_callback (const Server_Info &si, ACE_Time_Value &timeout)
void create_component_server_config_values (const Server_Info &info, Components::ConfigValues_out &config)

Private Attributes

ACE_CString default_args_
 Default args to pass to all componentservers.
SERVER_INFOS server_infos_
ACE_Process_Manager process_manager_
Child_Handler child_handler_
CORBA::ULong spawn_delay_
bool multithreaded_
CORBA::ORB_var orb_
PortableServer::POA_var poa_
ACE_CString cs_path_
ACE_CString cs_args_
TAO_SYNCH_MUTEX mutex_
ACE_Condition< TAO_SYNCH_MUTEX > condition_
CIAO::Deployment::ComponentInstallation_var ci_


Detailed Description

Default server activator for CIAO component servers.

Author:
William R. Otte <wotte@dre.vanderbilt.edu> Implements the default component server activation strategy which is to spawn new processes. This is not thread-safe, nor is it intended to be. Containers are reated serially, so there will be only one actor *modifying* data at a particular point in time.

Member Typedef Documentation


Constructor & Destructor Documentation

CIAO::Deployment::CIAO_ServerActivator_i::CIAO_ServerActivator_i ( CORBA::ULong  def_spawn_delay,
const char *  default_cs_path,
const char *  cs_args,
bool  multithreaded,
CIAO::Deployment::ComponentInstallation_ptr  ci,
CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa_ 
)

CIAO::Deployment::CIAO_ServerActivator_i::~CIAO_ServerActivator_i ( void   )  [virtual]


Member Function Documentation

void CIAO::Deployment::CIAO_ServerActivator_i::component_server_callback ( ::Components::Deployment::ComponentServer_ptr  serverref,
const char *  server_UUID,
::Components::ConfigValues_out  config 
) [virtual]

void CIAO::Deployment::CIAO_ServerActivator_i::configuration_complete ( const char *  server_UUID  )  [virtual]

ACE_CString CIAO::Deployment::CIAO_ServerActivator_i::construct_command_line ( Server_Info si  )  [private]

Builds command line options based on configuration information. May modify the uuid of the component server.

Components::Deployment::ComponentServer_ptr CIAO::Deployment::CIAO_ServerActivator_i::create_component_server ( const ::Components::ConfigValues &  config  ) 

void CIAO::Deployment::CIAO_ServerActivator_i::create_component_server_config_values ( const Server_Info info,
Components::ConfigValues_out &  config 
) [private]

Components::Deployment::ComponentServers * CIAO::Deployment::CIAO_ServerActivator_i::get_component_servers ( void   ) 

void CIAO::Deployment::CIAO_ServerActivator_i::multi_threaded_wait_for_callback ( const Server_Info si,
ACE_Time_Value timeout 
) [private]

This method is only applicable when our program is configured as multiple threaded. Internally it waits on a conditional variable that could be modified by the callback servant which runs in another thread

void CIAO::Deployment::CIAO_ServerActivator_i::remove_component_server ( ::Components::Deployment::ComponentServer_ptr  server  )  [virtual]

void CIAO::Deployment::CIAO_ServerActivator_i::single_threaded_wait_for_callback ( const Server_Info si,
ACE_Time_Value timeout 
) [private]

This method is only applicable when our program is configured as singled threaded . Internally it uses a <perform_work> blocking call to wait for NA object to call back

pid_t CIAO::Deployment::CIAO_ServerActivator_i::spawn_component_server ( const Server_Info si,
const ACE_CString cmd_line 
) [private]

Spawns the component server process, but does not wait for it to call back.


Member Data Documentation

CIAO::Deployment::ComponentInstallation_var CIAO::Deployment::CIAO_ServerActivator_i::ci_ [private]

Default args to pass to all componentservers.


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

Generated on Mon Jul 13 17:17:30 2009 for CIAO by  doxygen 1.5.8