summaryrefslogtreecommitdiff
path: root/modules/CIAO/DAnCE/DomainApplication/Domain_Application_Impl.h
blob: 69dea848e0b5f142cff17fc18e0dff1e661221f1 (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
80
81
// $Id$
/**========================================================
 *
 * @file   Domain_Application_Impl.h
 *
 * @Brief  This file contains the implementation of
 *         the DomainApplication interface.
 *
 * @author Vinzenz Tornow <vt@prismtech.com>
 *========================================================*/

#ifndef DOMAIN_APPLICATION_H
#define DOMAIN_APPLICATION_H
#include /**/ "ace/pre.h"

#include "Domain_Application_Export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "Deployment/Deployment_DomainApplicationS.h"
#include "ace/Map_Manager.h"
#include "Deployment/Deployment_NodeApplicationC.h"
#include "Deployment/Deployment_NodeApplicationManagerC.h"
#include "Deployment/Deployment_NodeManagerC.h"

namespace DAnCE
  {

  /**
   * @class DomainApplication_Impl
   *
   * @brief This class implements the DomainApplication interface.
   *
   **/
  class Domain_Application_Export DomainApplication_Impl
        : public virtual POA_Deployment::DomainApplication
    {
    public:
      typedef ACE_Map_Manager < Deployment::NodeApplicationManager_var,
        Deployment::NodeManager_var,
        ACE_Null_Mutex > TNam2Nm;
      typedef ACE_Map_Manager < Deployment::Application_var,
        Deployment::NodeApplicationManager_var,
        ACE_Null_Mutex > TApp2Mgr;

      DomainApplication_Impl (TNam2Nm& nams,
                              const Deployment::Properties & configProperty,
                              Deployment::Connections& conn);
      ~DomainApplication_Impl();

      void startLaunch (const Deployment::Properties & configProperty);

      /**
      * The second step in launching an application in the
      * domain-level.  If the start parameter is true, the application
      * is started as well.  Raises the StartError exception if
      * launching or starting the application fails.
      */
      virtual void
      finishLaunch (const Deployment::Connections & connections,
                    CORBA::Boolean start);
      /**
      * Starts the application. Raises the StartError exception if
      * starting the application fails.
      */
      virtual void start ();

    private:
      TApp2Mgr node_applications_;
      Deployment::Connections connections_;
      TNam2Nm & nams_;
      Deployment::Application_var na_;
    };
} // DAnCE

#include /**/ "ace/post.h"
#endif // DOMAIN_APPLICATION_H