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

CIAO::Container_Impl Class Reference

Servant implementation for the interface Deployment::Container. More...

#include <Container_Impl.h>

Collaboration diagram for CIAO::Container_Impl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Container_Impl (CORBA::ORB_ptr o, PortableServer::POA_ptr p,::Deployment::NodeApplication_ptr server, const Static_Config_EntryPoints_Maps *static_entrypts_maps=0)
 Constructor.
virtual ~Container_Impl (void)
 Destructor.
virtual CORBA::Long init (const CORBA::PolicyList *policies ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
 Initialize the container.
Deployment::ComponentInfos * install (const ::Deployment::ContainerImplementationInfo &container_impl_info ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Deployment::UnknownImplId, Deployment::ImplEntryPointNotFound, Deployment::InstallationFailure, Components::InvalidConfiguration)
 Install all homes and components.
virtual void remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Components::RemoveFailure)
 Remove all homes and components.
virtual ::Deployment::Properties * properties (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
 Deployment::Container interface defined attributes/operations.
virtual ::Deployment::NodeApplication_ptr get_node_application (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
virtual PortableServer::POA_ptr _default_POA (void)
virtual ::Components::CCMHome_ptr install_home (const ::Deployment::ComponentImplementationInfo &impl_info ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Deployment::UnknownImplId, Deployment::ImplEntryPointNotFound, Deployment::InstallationFailure, Components::InvalidConfiguration)
virtual void remove_home (const char *comp_ins_name ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Components::RemoveFailure)
virtual ::Components::CCMHomes * get_homes (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
bool register_with_ns (const char *obj_name, CORBA::ORB_ptr orb, Components::CCMObject_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS)
bool unregister_with_ns (const char *obj_name, CORBA::ORB_ptr orb ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual void remove_components (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Components::RemoveFailure)
virtual void remove_component (const char *comp_ins_name ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Components::RemoveFailure)
void set_objref (Deployment::Container_ptr o ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 Set the cached object reference.
Deployment::Container_ptr get_objref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)

Protected Types

typedef ACE_Hash_Map_Manager_Ex<
ACE_CString, Components::CCMHome_ptr,
ACE_Hash< ACE_CString >,
ACE_Equal_To< ACE_CString >,
ACE_Null_Mutex
CCMHome_Map
 To store all created CCMHome object.
typedef CCMHome_Map::iterator Home_Iterator
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
 To store all created Component object.
typedef CCMComponent_Map::iterator Component_Iterator

Protected Attributes

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.
CIAO::Container * container_
 Internal container implementation.
Deployment::Properties properties_
 Cached ConfigValues.
Deployment::Container_var objref_
 Cached Container reference (of ourselves.).
Deployment::NodeApplication_var nodeapp_
 Cached NodeApplication.
CCMHome_Map home_map_
CCMComponent_Map component_map_
const Static_Config_EntryPoints_Maps * static_entrypts_maps_

Detailed Description

Servant implementation for the interface Deployment::Container.

This class implements the Deployment::Container interface which is not defined by the CCM DnC specification. As the interface implies, this is actually part of the deployment interface and is used to manage the lifecycle of the installed components and homes.


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::Container_Impl::CCMComponent_Map [protected]
 

To store all created Component object.

typedef ACE_Hash_Map_Manager_Ex<ACE_CString, Components::CCMHome_ptr, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> CIAO::Container_Impl::CCMHome_Map [protected]
 

To store all created CCMHome object.

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

typedef CCMHome_Map::iterator CIAO::Container_Impl::Home_Iterator [protected]
 


Constructor & Destructor Documentation

ACE_INLINE CIAO::Container_Impl::Container_Impl CORBA::ORB_ptr  o,
PortableServer::POA_ptr  p,
::Deployment::NodeApplication_ptr  server,
const Static_Config_EntryPoints_Maps *  static_entrypts_maps = 0
 

Constructor.

CIAO::Container_Impl::~Container_Impl void   )  [virtual]
 

Destructor.


Member Function Documentation

PortableServer::POA_ptr CIAO::Container_Impl::_default_POA void   )  [virtual]
 

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

Components::CCMHomes * CIAO::Container_Impl::get_homes ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException)
 

virtual ::Deployment::NodeApplication_ptr CIAO::Container_Impl::get_node_application ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException)
 

ACE_INLINE::Deployment::Container_ptr CIAO::Container_Impl::get_objref ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   ) 
 

Get the cached object reference. This operation will invoke _this if there's no cached reference available. Notice that this method does *NOT* increase the reference count of the cached reference. @ Gan, caller should own memory. In this case you shoudl return a duplicate OR add a const to the operation signature. This is simply bad programming.

CORBA::Long CIAO::Container_Impl::init const CORBA::PolicyList *policies  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException) [virtual]
 

Initialize the container.

Deployment::ComponentInfos * CIAO::Container_Impl::install const ::Deployment::ContainerImplementationInfo &container_impl_info  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, Deployment::UnknownImplId, Deployment::ImplEntryPointNotFound, Deployment::InstallationFailure, Components::InvalidConfiguration)
 

Install all homes and components.

Components::CCMHome_ptr CIAO::Container_Impl::install_home const ::Deployment::ComponentImplementationInfo &impl_info  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, Deployment::UnknownImplId, Deployment::ImplEntryPointNotFound, Deployment::InstallationFailure, Components::InvalidConfiguration)
 

Deployment::Properties * CIAO::Container_Impl::properties ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException) [virtual]
 

Deployment::Container interface defined attributes/operations.

bool CIAO::Container_Impl::register_with_ns const char *  obj_name,
CORBA::ORB_ptr  orb,
Components::CCMObject_ptr obj  ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

void CIAO::Container_Impl::remove ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException, Components::RemoveFailure) [virtual]
 

Remove all homes and components.

void CIAO::Container_Impl::remove_component const char *comp_ins_name  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, Components::RemoveFailure) [virtual]
 

void CIAO::Container_Impl::remove_components ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException, Components::RemoveFailure) [virtual]
 

void CIAO::Container_Impl::remove_home const char *comp_ins_name  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, Components::RemoveFailure) [virtual]
 

@Note: I don't know how to remove a home right now. I assume that user will only call remove instead. This is true at least for DnC run time.

Right now, in this implementation I assumpe that there will be same number of homes as the components even if the components are of the same type. I don't think that we have the modeling side support of this either. So bear me if you think I avoid the real thinking for easiness.

ACE_INLINE void CIAO::Container_Impl::set_objref Deployment::Container_ptr o  ACE_ENV_ARG_DECL_WITH_DEFAULTS  ) 
 

Set the cached object reference.

bool CIAO::Container_Impl::unregister_with_ns const char *  obj_name,
CORBA::ORB_ptr orb  ACE_ENV_ARG_DECL_WITH_DEFAULTS
 


Member Data Documentation

CCMComponent_Map CIAO::Container_Impl::component_map_ [protected]
 

CIAO::Container* CIAO::Container_Impl::container_ [protected]
 

Internal container implementation.

CCMHome_Map CIAO::Container_Impl::home_map_ [protected]
 

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

Cached NodeApplication.

Deployment::Container_var CIAO::Container_Impl::objref_ [protected]
 

Cached Container reference (of ourselves.).

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

Keep a pointer to the managing ORB serving this servant.

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

Keep a pointer to the managing POA.

Deployment::Properties CIAO::Container_Impl::properties_ [protected]
 

Cached ConfigValues.

const Static_Config_EntryPoints_Maps* CIAO::Container_Impl::static_entrypts_maps_ [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Dec 21 00:01:02 2005 for DAnCE by  doxygen 1.3.9.1