blob: dd4cefb8cef35e872382b8f8911ff58c40ea220a (
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
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
|
/* -*- C++ -*- */
/**
* @file EC_Gateway_IIOP_Factory.h
*
* $Id$
*
* @author Johnny Willemsen (jwillemsen@remedy.nl)
*
*/
#ifndef TAO_EC_GATEWAY_IIOP_FACTORY_H
#define TAO_EC_GATEWAY_IIOP_FACTORY_H
#include /**/ "ace/pre.h"
#include "ace/Service_Config.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Time_Value.h"
#include "ace/Service_Object.h"
#include /**/ "event_export.h"
class TAO_ECG_ConsumerEC_Control;
class TAO_EC_Gateway_IIOP;
/**
* @class TAO_EC_Gateway_IIOP_Factory
*
* @brief Factory for the EC_Gateway_IIOP settings
*
* Default configuration values can be found in ECG_Defaults.h
*/
class TAO_RTEvent_Export TAO_EC_Gateway_IIOP_Factory
: public ACE_Service_Object
{
public:
TAO_EC_Gateway_IIOP_Factory (void);
virtual ~TAO_EC_Gateway_IIOP_Factory (void);
/// The Service_Object entry points.
//@{
virtual int init (int argc, char* argv[]);
virtual int fini (void);
//@}
/// Helper function to register the Gateway into the service
/// configurator.
static int init_svcs (void);
/// Create the consumer event channel control.
TAO_ECG_ConsumerEC_Control *
create_consumerec_control (TAO_EC_Gateway_IIOP* gateway);
/// Destroy consumer event channel control.
void destroy_consumerec_control (TAO_ECG_ConsumerEC_Control* x);
/// Accessors to use_ttl flag
int use_ttl (void) const;
/// Accessors to use_consumer_proxy_map flag
int use_consumer_proxy_map (void) const;
private:
/// Helper for agrument parsing. Prints out an error message about
/// unsupported option value.
void unsupported_option_value (const char * option_name,
const char * option_value);
protected:
/// Use this ORB to locate global resources.
ACE_CString orbid_;
/// The control policy for the consumer event channel
int consumer_ec_control_;
/// The consumer event channel control periods in usecs
int consumer_ec_control_period_;
/// The control timeout in usecs for the consumer event channel
ACE_Time_Value consumer_ec_control_timeout_;
/// If 1, we use the TTL flags, if 0, we just ignore TTL.
/// @note When this flag is set to 0, make sure that no recursive structures
/// exists in the gateway setup for the same source/type combination, else
/// one event will flow continuosly through all gateways.
int use_ttl_;
/// The flag for using the consumer proxy map. With 1 the consumer proxy map
/// is used, meaning that for each unique source id we use a different
/// proxy push consumer, if 0, we only use one proxy push consumer for all
/// source ids.
int use_consumer_proxy_map_;
};
ACE_STATIC_SVC_DECLARE (TAO_EC_Gateway_IIOP_Factory)
ACE_FACTORY_DECLARE (TAO_RTEvent, TAO_EC_Gateway_IIOP_Factory)
#if defined (__ACE_INLINE__)
#include "EC_Gateway_IIOP_Factory.i"
#endif /* __ACE_INLINE__ */
#include /**/ "ace/post.h"
#endif /* TAO_EC_GATEWAY_IIOP_FACTORY_H */
|