blob: 71a2eb6e211f3933f1e0b94857cce3440bfb6246 (
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
|
// -*- C++ -*-
//==========================================================================
/**
* @file Naming_Service.h
*
* $Id$
*
* This class implements the functionality of a Naming_Service in
* a stand-alone process.
*
* @author Nagarajan Surendran (naga@cs.wustl.edu) Marina Spivak <marina@cs.wustl.edu>
*/
//==========================================================================
#ifndef TAO_NAMING_SERVICE_H
#define TAO_NAMING_SERVICE_H
#include "orbsvcs/Naming/Naming_Server.h"
/**
* @class TAO_Naming_Service
*
* @brief Defines a class that encapsulates the implementation of the
* COS Naming Service.
*
* This class makes use of the <TAO_Naming_Server>
* to implement the COS Naming Service.
*/
class TAO_Naming_Service
{
public:
/// Default Constructor.
TAO_Naming_Service (void);
/// Constructor taking the command-line arguments.
TAO_Naming_Service (int argc, ACE_TCHAR* argv[]);
/// Initialize the Naming Service with the arguments.
virtual int init (int argc, ACE_TCHAR* argv[]);
/// The opposite of init().
virtual int fini (void);
/// Run the TAO_Naming_Service.
int run (void);
/// Shut down the TAO_Naming_Service; you must still call fini().
void shutdown (void);
/// Destructor.
virtual ~TAO_Naming_Service (void);
protected:
/// Parse the command line arguments to find
/// the timeout period.
int parse_args (int &argc, ACE_TCHAR* argv[]);
/// The ORB.
CORBA::ORB_var orb_;
/// Naming Server instance.
TAO_Naming_Server my_naming_server_;
/// After how long the server should stop listening to requests (in
/// seconds).
long time_;
/// Number of threads for running the ORB. Default is 1
int num_threads_;
};
#endif /* TAO_NAMING_SERVICE_H */
|