1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
// -*- C++ -*-
//=============================================================================
/**
* @file ComponentInstallation_Impl.h
*
* $Id$
*
* This file contains implementation for the servant of
* Components::Deployment::ComponentInstallation interface.
*
* @author Nanbor Wang <nanbor@cs.wustl.edu>
*/
//=============================================================================
#ifndef CIAO_COMPONENTINSTALLATION_IMPL_H
#define CIAO_COMPONENTINSTALLATION_IMPL_H
#include /**/ "ace/pre.h"
#include "CCM_DeploymentS.h"
#include "ace/Configuration.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
namespace CIAO
{
/**
* @class ComponentInstallation_Impl
*
* @brief Servant implementation for Components::Deployment::ComponentInstallation
*
* This class implements the Components::Deployment::ComponentInstallation
* 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.
*/
class CIAO_SERVER_Export ComponentInstallation_Impl
: public virtual POA_Components::Deployment::ComponentInstallation
{
public:
/// Constructor
ComponentInstallation_Impl (CORBA::ORB_ptr o,
PortableServer::POA_ptr p);
/// Destructor
virtual ~ComponentInstallation_Impl (void);
/// Get the containing POA. This operation does *not*
/// increase the reference count of the POA.
virtual PortableServer::POA_ptr _default_POA (void);
/// Initialize the ComponentInstallation.
int init (const char *fname,
const char *section
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
/// Initialize the ComponentInstallation.
int fini ();
/// Components::Deployment::ComponentInstallation defined attributes/operations.
virtual void install (const char * implUUID,
const char * component_loc
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::Deployment::InvalidLocation,
Components::Deployment::InstallationFailure));
virtual void replace (const char * implUUID,
const char * component_loc
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::Deployment::InvalidLocation,
Components::Deployment::InstallationFailure));
virtual void remove (const char * implUUID
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::Deployment::UnknownImplId,
Components::RemoveFailure));
virtual char * get_implementation (const char * implUUID
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
Components::Deployment::UnknownImplId,
Components::Deployment::InstallationFailure));
protected:
/// Keep a pointer to the managing ORB serving this servant.
CORBA::ORB_var orb_;
/// Keep a pointer to the managing POA.
PortableServer::POA_var poa_;
/// Persistent store filename for storing the configuration info.
CORBA::String_var filename_;
/// Section name in Configuration
CORBA::String_var section_name_;
/// Mapping and persistent
ACE_Configuration *installation_;
};
}
#if defined (__ACE_INLINE__)
# include "ComponentInstallation_Impl.inl"
#endif /* __ACE_INLINE__ */
#include /**/ "ace/post.h"
#endif /* CIAO_COMPONENTINSTALLATION_IMPL_H */
|