summaryrefslogtreecommitdiff
path: root/ACEXML/compass/ComponentServer.h
blob: ebcaa53e1574f234710c091de4cba519b1398bdb (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
// $Id$


#ifndef COMPASS_COMPONENT_SERVER_H
#define COMPASS_COMPONENT_SERVER_H

#include "ace/pre.h"
#include "ACEXML/compass/Compass_Export.h"

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

#include "ace/Unbounded_Set.h"
#include "ACEXML/compass/CompassTypes.h"

namespace Deployment
{
  class Container;        // Forward decl.
  typedef ACE_Unbounded_Set<Container*> Containers;

  class Compass_Export ComponentServer
  {
  public:
    ComponentServer (ConfigValues* config = 0);
    ~ComponentServer();

    ServerActivator* get_server_activator ();

    Container* create_container (ConfigValues* config = 0)
      ACE_THROW_SPEC ((CreateFailure, InvalidConfiguration));

    void remove_container (Container* cref)
      ACE_THROW_SPEC ((RemoveFailure));

    Containers* get_containers ();

    void remove ()
      ACE_THROW_SPEC ((RemoveFailure));

    const ConfigValues& get_configuration (void);

    void set_configuration (ConfigValues* config);

  private:
    Containers* containers_;
    ServerActivator* activator_;
    ConfigValues* config_;
  };

}

#if defined (__ACE_INLINE__)
#include "ComponentServer.inl"
#endif /* __ACE_INLINE__ */

#endif /* COMPASS_COMPONENT_SERVER_H */