summaryrefslogtreecommitdiff
path: root/Output_Adapters/DAnCE_Output_Adapter/Admin_exec.h
blob: 4ce04c3e1fa9aba0f6c5a87dcc3a1cabb5b43d41 (plain)
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
#ifndef ADMIN_EXEC_H
#define ADMIN_EXEC_H

#include "DAnCE_Output_Adapter_svnt.h"
#include "DAnCE_Output_Adapter_exec_export.h"
#include "tao/LocalObject.h"

#include "Plan_Launcher/Plan_Launcher_Impl.h"
#include "Plan_Generator_Impl.h"
#include "Logger.h"

namespace CIAO
{
  namespace RACE
  {
    namespace DAnCE_OA
    {
      namespace CIDL_DAnCE_OA_Impl
      {
        class DANCE_OUTPUT_ADAPTER_EXEC_Export Admin_exec_i
          : public virtual ::CIAO::RACE::DAnCE_OA::CCM_Admin,
          public virtual TAO_Local_RefCounted_Object
        {
        public:
          Admin_exec_i (DAnCE_OA_Component_Context *context,
            const char * repoman_id,
            Logger &logger);

          virtual ~Admin_exec_i (void);

          virtual ::CORBA::Boolean deploy_string
            (const ::CIAO::RACE::OperationalString & opstring);

          virtual ::CORBA::Boolean redeploy_string
            (const ::CIAO::RACE::OperationalString & opstring);

          virtual ::CORBA::Boolean tear_down_string
            (const char * ID);

        protected:

          /// Convert the operational string to a deployment_plan.
          virtual bool opstring_to_dplan 
            (const ::CIAO::RACE::OperationalString &opstring,
            ::Deployment::DeploymentPlan &plan);

          virtual bool deploy_plan
            (const ::Deployment::DeploymentPlan & plan);

          virtual bool redeploy_plan
            (const ::Deployment::DeploymentPlan & plan);

        private:

          /// Pointer to the component's context object.
          DAnCE_OA_Component_Context *context_;

          /// PlanLauncher object.
          Plan_Launcher::Plan_Launcher_i launcher_;

          /// ID of the repoman.
          CORBA::String_var repoman_id_;

          // CIAO Plan generator object.
          ::CIAO::Plan_Generator::Plan_Generator_i plan_gen_;

          /// Can the repoman be used?
          bool repoman_;

          Logger &logger_;


        };
      }
    }
  }
}

#endif /* CIAO_DANCE_OUTPUT_ADAPTER_EXEC_H */