summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Component.h
blob: 166d30377341538c2af77f006bb58b33fe426135 (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
// -*- C++ -*-

//=============================================================================
/**
 * @file LB_Component.h
 *
 * $Id$

 * @author Ossama Othman <ossama@uci.edu>
 */
//=============================================================================

#ifndef TAO_LB_COMPONENT_H
#define TAO_LB_COMPONENT_H

#include /**/ "ace/pre.h"

#include "orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_export.h"

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

#include "orbsvcs/orbsvcs/LB_ORTC.h"

#include "ace/Service_Object.h"
#include "ace/Service_Config.h"

/**
 * @class TAO_LB_Component
 *
 * @brief Service_Object that can be used to add load balancer support
 *        to a CORBA-based server.
 *
 * Servers wishing to transparently add load balancing/management
 * support load this object via the ACE_Service_Configurator (e.g. by
 * listing it in a `svc.conf' file).
 */
class TAO_LoadBalancing_Export TAO_LB_Component
  : public ACE_Service_Object
{
public:

  /// Initializes object when dynamic linking occurs.
  virtual int init (int argc, ACE_TCHAR *argv[]);

  /// Terminates object when dynamic unlinking occurs.
  virtual int fini (void);

protected:

  /// Register the LB_Component's ORBInitializer.
  int register_orb_initializer (const CORBA::StringSeq & object_groups,
                                const CORBA::StringSeq & repository_ids,
                                const char * location);

};


ACE_STATIC_SVC_DECLARE_EXPORT (TAO_LoadBalancing, TAO_LB_Component)
ACE_STATIC_SVC_REQUIRE (TAO_LB_Component)
ACE_FACTORY_DECLARE (TAO_LoadBalancing, TAO_LB_Component)


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

#endif  /* TAO_LB_COMPONENT_H */