CIAO::NodeApplicationManager_Impl_Base Class Reference

#include <NodeApplicationManager_Impl.h>

Inheritance diagram for CIAO::NodeApplicationManager_Impl_Base:

Inheritance graph
[legend]
Collaboration diagram for CIAO::NodeApplicationManager_Impl_Base:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 NodeApplicationManager_Impl_Base (CORBA::ORB_ptr o, PortableServer::POA_ptr p)
 Constructor.
virtual Deployment::Application_ptr startLaunch (const Deployment::Properties &configProperty, Deployment::Connections_out providedReference, CORBA::Boolean start)
virtual void destroyApplication (Deployment::Application_ptr)
virtual Deployment::Application_ptr perform_redeployment (const Deployment::Properties &configProperty, Deployment::Connections_out providedReference, CORBA::Boolean add_or_remove, CORBA::Boolean start)
virtual void reset_plan (const ::Deployment::DeploymentPlan &plan)
virtual void set_shared_components (const Deployment::ComponentPlans &shared)
virtual PortableServer::ObjectId init (const char *nodeapp_location, const char *nodeapp_options, const CORBA::ULong delay, const Deployment::DeploymentPlan &plan, const PortableServer::POA_ptr callback_poa, NodeManager_Impl_Base *nm)=0
Deployment::NodeApplicationManager_ptr get_nodeapp_manager (void)
 
Note:
This method doesn't do duplicate.

virtual ::CORBA::Long set_priority (const char *cid, const ::Deployment::Sched_Params &params)
 Set the priority of the NodeApplication process which this NAM manages.

Protected Types

typedef
ACE_Hash_Map_Manager_Ex
< ACE_CString,
Components::CCMObject_var,
ACE_Hash< ACE_CString >,
ACE_Equal_To< ACE_CString >,
ACE_Null_Mutex
CCMComponent_Map
 A map of the component created on this node.
typedef CCMComponent_Map::iterator Component_Iterator

Protected Member Functions

virtual ~NodeApplicationManager_Impl_Base (void)
 Destructor.
virtual void add_new_components (void)
 Add new components.
virtual void remove_existing_components (void)
 Remove existing components.
virtual bool is_to_be_removed (const char *name)
virtual
Deployment::NodeApplication_ptr 
create_node_application (const ACE_CString &options)=0
 Internal help function to create new NodeApplicationProcess.
virtual Deployment::Connectionscreate_connections ()
 Helper function to get the connection.
void parse_config_value (ACE_CString &str)
bool is_shared_component (ACE_CString &name)
bool is_external_component (ACE_CString &name)

Protected Attributes

ACE_CString nodeapp_path_
 location of the Nodeapplication
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.
NodeManager_Impl_Basenode_manager_
Deployment::NodeApplicationManager_var objref_
 ObjectRef of ourself which will be needed by the callback.
PortableServer::POA_var callback_poa_
 Child poa that uses active object map.
Deployment::NodeApplication_var nodeapp_
Deployment::DeploymentPlan plan_
CORBA::ULong spawn_delay_
CORBA::String_var nodeapp_command_op_
 Extracted commandline options to pass to the NodeApplication.
Deployment::ComponentPlans shared_components_
 A list of components shared across deployment plans.
Deployment::ComponentPlans external_components_
 A list of components that are "external" to this plan.
CCMComponent_Map component_map_
TAO_SYNCH_MUTEX lock_
 Synchronize access to the object set.
ACE_Process_Manager node_app_process_manager_
 The Process Manager for this NodeApplicationManager.
pid_t process_id_
ACE_Condition< TAO_SYNCH_MUTEX > waitCond_
 For synchronization between multiple threads.
TAO_SYNCH_MUTEX mutex_


Member Typedef Documentation

typedef ACE_Hash_Map_Manager_Ex<ACE_CString, Components::CCMObject_var, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> CIAO::NodeApplicationManager_Impl_Base::CCMComponent_Map [protected]

A map of the component created on this node.

typedef CCMComponent_Map::iterator CIAO::NodeApplicationManager_Impl_Base::Component_Iterator [protected]


Constructor & Destructor Documentation

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

Constructor.

CIAO::NodeApplicationManager_Impl_Base::~NodeApplicationManager_Impl_Base ( void   )  [protected, virtual]

Destructor.


Member Function Documentation

Deployment::Application_ptr CIAO::NodeApplicationManager_Impl_Base::startLaunch ( const Deployment::Properties configProperty,
Deployment::Connections_out  providedReference,
CORBA::Boolean  start 
) [virtual]

The return type is NodeApplication_ptr actually. For "external/shared" components of this child plan, they are not actaully installed, however, the object references of the ports of these external components are returned through <providedReference>.

1. First Map properties to TAO/CIAO specific property/configurations 2. Necessary property checking (needed?) 3. Call create_nade_application to spawn new process. 4. Initialize the NodeApplication. 5. get the provided connection endpoints back and return them.

void CIAO::NodeApplicationManager_Impl_Base::destroyApplication ( Deployment::Application_ptr  app  )  [virtual]

Deployment::Application_ptr CIAO::NodeApplicationManager_Impl_Base::perform_redeployment ( const Deployment::Properties configProperty,
Deployment::Connections_out  providedReference,
CORBA::Boolean  add_or_remove,
CORBA::Boolean  start 
) [virtual]

ACE_INLINE void CIAO::NodeApplicationManager_Impl_Base::reset_plan ( const ::Deployment::DeploymentPlan plan  )  [virtual]

void CIAO::NodeApplicationManager_Impl_Base::set_shared_components ( const Deployment::ComponentPlans shared  )  [virtual]

virtual PortableServer::ObjectId CIAO::NodeApplicationManager_Impl_Base::init ( const char *  nodeapp_location,
const char *  nodeapp_options,
const CORBA::ULong  delay,
const Deployment::DeploymentPlan plan,
const PortableServer::POA_ptr  callback_poa,
NodeManager_Impl_Base nm 
) [pure virtual]

A factory operation to create NodeApplicationManager interface, and return the object reference. Initialize the NodeApplicationManager. The current implementation of CIAO_NodeApplicationManager can only activate CIAO's own NodeApplication processes. You should specify the location (pathname) of the NodeApplication and the delay. CIAO_NodeApplicationManager should wait (in second) for NodeApplication to call back.

Parameters:
nodeapp_location A null-termiated char * string pointing to the pathname of a NodeApplication executable.
nodeapp_options A null-terminated char * string containing command line options to be passed to the NodeApplication.
delay instructs how long (in second) a CIAO_NodeApplicationManager should wait for a newly spawned NodeApplication to pass back its IOR.
plan has all the information needed for the NodeAppManager to construct the application locally. Note, this includes the properties of the NodeApplication. For example, ORB config options etc.
callback_poa contains child poa created for the callback interface.
nm Pointer to the NodeManager_Impl servant object

Returns:
NodeApplicationManager_ptr.

Implemented in CIAO::NodeApplicationManager_Impl, and CIAO::Static_NodeApplicationManager_Impl.

ACE_INLINE Deployment::NodeApplicationManager_ptr CIAO::NodeApplicationManager_Impl_Base::get_nodeapp_manager ( void   ) 

Note:
This method doesn't do duplicate.

CORBA::Long CIAO::NodeApplicationManager_Impl_Base::set_priority ( const char *  cid,
const ::Deployment::Sched_Params params 
)

Set the priority of the NodeApplication process which this NAM manages.

void CIAO::NodeApplicationManager_Impl_Base::add_new_components ( void   )  [protected, virtual]

Add new components.

void CIAO::NodeApplicationManager_Impl_Base::remove_existing_components ( void   )  [protected, virtual]

Remove existing components.

bool CIAO::NodeApplicationManager_Impl_Base::is_to_be_removed ( const char *  name  )  [protected, virtual]

Determine whether a component is absent in the new_plan Return true if absent

virtual Deployment::NodeApplication_ptr CIAO::NodeApplicationManager_Impl_Base::create_node_application ( const ACE_CString options  )  [protected, pure virtual]

Internal help function to create new NodeApplicationProcess.

Implemented in CIAO::NodeApplicationManager_Impl, and CIAO::Static_NodeApplicationManager_Impl.

Deployment::Connections * CIAO::NodeApplicationManager_Impl_Base::create_connections (  )  [protected, virtual]

Helper function to get the connection.

ACE_INLINE void CIAO::NodeApplicationManager_Impl_Base::parse_config_value ( ACE_CString str  )  [protected]

Find the configurations in the plan and prepare them to pass to the NodeApplication, from command line probably.

bool CIAO::NodeApplicationManager_Impl_Base::is_shared_component ( ACE_CString name  )  [protected]

Helper function to check wheather a component instance is in the "shared components list".

bool CIAO::NodeApplicationManager_Impl_Base::is_external_component ( ACE_CString name  )  [protected]

Helper function to check wheather a component instance is in the "shared components list".


Member Data Documentation

ACE_CString CIAO::NodeApplicationManager_Impl_Base::nodeapp_path_ [protected]

location of the Nodeapplication

CORBA::ORB_var CIAO::NodeApplicationManager_Impl_Base::orb_ [protected]

Keep a pointer to the managing ORB serving this servant.

PortableServer::POA_var CIAO::NodeApplicationManager_Impl_Base::poa_ [protected]

Keep a pointer to the managing POA.

NodeManager_Impl_Base* CIAO::NodeApplicationManager_Impl_Base::node_manager_ [protected]

Pointer to the NodeManager_Impl servant object We could do this because NodeManager and NodeApplicationManager are always collocated in the same process, so we don't have to pass CORBA object reference back and forth.

Deployment::NodeApplicationManager_var CIAO::NodeApplicationManager_Impl_Base::objref_ [protected]

ObjectRef of ourself which will be needed by the callback.

PortableServer::POA_var CIAO::NodeApplicationManager_Impl_Base::callback_poa_ [protected]

Child poa that uses active object map.

Deployment::NodeApplication_var CIAO::NodeApplicationManager_Impl_Base::nodeapp_ [protected]

Cache a object reference of the underlying NodeApplication Since I have decided to have only 1 NA in NAM so no map is needed.

Deployment::DeploymentPlan CIAO::NodeApplicationManager_Impl_Base::plan_ [protected]

Cached plan (This should be the part of the whole plan local to this node) The plan will be initialized when init is called.

CORBA::ULong CIAO::NodeApplicationManager_Impl_Base::spawn_delay_ [protected]

Specify the time in second NodeApplicationManager will wait for a child NodeApplication to callback. Default is 5 second.

CORBA::String_var CIAO::NodeApplicationManager_Impl_Base::nodeapp_command_op_ [protected]

Extracted commandline options to pass to the NodeApplication.

Deployment::ComponentPlans CIAO::NodeApplicationManager_Impl_Base::shared_components_ [protected]

A list of components shared across deployment plans.

Deployment::ComponentPlans CIAO::NodeApplicationManager_Impl_Base::external_components_ [protected]

A list of components that are "external" to this plan.

CCMComponent_Map CIAO::NodeApplicationManager_Impl_Base::component_map_ [protected]

TAO_SYNCH_MUTEX CIAO::NodeApplicationManager_Impl_Base::lock_ [protected]

Synchronize access to the object set.

ACE_Process_Manager CIAO::NodeApplicationManager_Impl_Base::node_app_process_manager_ [protected]

The Process Manager for this NodeApplicationManager.

pid_t CIAO::NodeApplicationManager_Impl_Base::process_id_ [protected]

The process id of the NA associated with the NAM, Each NAM will only have one NA associated with it, so we have only one process associated with it.

ACE_Condition<TAO_SYNCH_MUTEX> CIAO::NodeApplicationManager_Impl_Base::waitCond_ [protected]

For synchronization between multiple threads.

TAO_SYNCH_MUTEX CIAO::NodeApplicationManager_Impl_Base::mutex_ [protected]


The documentation for this class was generated from the following files:
Generated on Thu Feb 21 04:20:42 2008 for DAnCE by  doxygen 1.5.3-6