blob: b4cfd607b1a99baddda29aa35f5bccefbc12a7ff (
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
|
/* -*- C++ -*- */
// $Id$
// ============================================================================
//
// = FILENAME
// CosEvent_Service.h
//
// = AUTHOR
// Pradeep Gore <pradeep@cs.wustl.edu>
//
// = DESCRIPTION
// The COS Event Channel service.
//
// ============================================================================
#ifndef COSEVENT_SERVICE_H
#define COSEVENT_SERVICE_H
#include "orbsvcs/CosEvent_Utilities.h"
#include "orbsvcs/CosNamingC.h"
class CosEvent_Service : public CosEC_ServantBase
{
// = TITLE
// CosEvent_Service
//
// = DESCRIPTION
// Implementation of the COS Event Service.
public:
// = Initialization and termination methods.
CosEvent_Service (void);
// Constructor.
virtual ~CosEvent_Service (void);
// Destructor.
int parse_args (int argc, char *argv []);
// Parses the command line arguments.
void startup (int argc, char *argv[],
CORBA::Environment &ACE_TRY_ENV);
// Initializes the COS Event Service.
// Returns 0 on success, -1 on error.
int run (void);
// run the COS Event Service.
// Returns 0 on success, -1 on error.
void shutdown (CORBA::Environment &ACE_TRY_ENV =
CORBA::default_environment ());
// Shutdown the COS Event Service.
// Returns 0 on success, -1 on error.
protected:
// = Methods from CosEC_ServantBase
virtual POA_RtecEventChannelAdmin::EventChannel_ptr
create_rtec (CORBA::Environment &ACE_TRY_ENV);
// Create a local rtec.
virtual void activate_rtec (CORBA::Environment &ACE_TRY_ENV);
// Activates the rtec.
virtual void deactivate_rtec (CORBA::Environment &ACE_TRY_ENV);
// Deactivates the rtec.
void init_ORB (int argc, char *argv [],
CORBA::Environment &ACE_TRY_ENV);
// initialize the ORB.
void resolve_naming_service (CORBA::Environment &ACE_TRY_ENV);
// Resolve the naming service.
void locate_rtec (CORBA::Environment &ACE_TRY_ENV);
// Locate a rtec.
// = Data members
const char* service_name;
// The name we use to register with the Naming Service.
const char* rt_service_name;
// The name of the Real Time Event Service.
PortableServer::POA_var poa_;
// Reference to the root poa.
CORBA::ORB_var orb_;
// The ORB that we use.
CosNaming::NamingContext_var naming_;
// A naming context.
CORBA::Boolean remote_Rtec_;
// Flag to indicate if the RtEC is local/remote,
// 0 => local, 1 => remote, default is local.
};
#endif /* COSEVENT_SERVICE_H */
|