blob: 46822e33240ce9a4979df4d584508dc94d49aafb (
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 Notifier_Server.h
*
* @author Pradeep Gore <pradeep@cs.wustl.edu>
*/
//=============================================================================
#ifndef _NOTIFIER_SERVER_H
#define _NOTIFIER_SERVER_H
#include "Event_Comm_i.h"
#include "tao/Utils/ORB_Manager.h"
#include "orbsvcs/CosNamingS.h"
#include "orbsvcs/Naming/Naming_Client.h"
/**
* @class Notifier_Server
*
* @brief The Notifier Server that handles CORBA operations from
* Consumers and Suppliers.
*/
class Notifier_Server
{
public:
/// Constructor.
Notifier_Server (void);
/// Destructor.
~Notifier_Server (void);
/// Initialize the Server state.
int init (int argc, ACE_TCHAR *argv[]);
/// Run the orb.
int run (void);
/// Close the naming service.
int close (void);
/// Reactor accessor.
ACE_Reactor *reactor(void);
private:
/// Initialises the name server and registers the Notifier server
/// object name with the name server.
int init_naming_service (void);
/// The ORB manager.
TAO_ORB_Manager orb_manager_;
/// Servant for the Notifier interface.
Notifier_i servant_;
/// Naming context for the naming service.
CosNaming::NamingContext_var naming_context_;
/// helper class for getting access to Naming Service.
TAO_Naming_Client naming_server_;
};
#define NOTIFIER_BIND_NAME "Notifier"
#endif /* _NOTIFIER_SERVER_H */
|