OpenDDS  Snapshot(2023/04/28-20:55)
DCPSInfoRepoServ.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef DCPSINFOREPOSERV_H
9 #define DCPSINFOREPOSERV_H
10 
11 #include <orbsvcs/Shutdown_Utilities.h>
12 
13 #include <string>
14 
16 
18 #include "FederatorConfig.h"
19 #include "FederatorManagerImpl.h"
20 #include "ShutdownInterface.h"
21 
22 #include "ace/Event_Handler.h"
24 
26  : public ShutdownInterface, public virtual ACE_Event_Handler {
27 public:
28  struct InitError {
29  InitError(const char* msg)
30  : msg_(msg) {};
31  std::string msg_;
32  };
33 
34  InfoRepo(int argc, ACE_TCHAR *argv[]);
35  ~InfoRepo();
36  void run();
37 
38  /// ShutdownInterface used to schedule a shutdown.
39  virtual void shutdown();
40 
41  void set_shutdown_signal(int which_signal);
42 
43  /// shutdown() and wait for it to complete: cannot be called from the reactor
44  /// thread.
45  void sync_shutdown();
46 
47  /// Handler for the reactor to dispatch finalization activity to.
48  virtual int handle_exception(ACE_HANDLE fd = ACE_INVALID_HANDLE);
49 
50 private:
51  void init();
52  void usage(const ACE_TCHAR * cmd);
53  void parse_args(int argc, ACE_TCHAR *argv[]);
54 
55  /// Actual finalization of service resources.
56  void finalize();
57 
59 
61  std::string listen_address_str_;
63  bool use_bits_;
64  bool resurrect_;
66 
67  /// Flag to indicate that finalization has already occurred.
68  bool finalized_;
70 
71  /// Repository Federation behaviors
74 
76 
80 
82 
84 };
85 
87  public Shutdown_Functor {
88 public:
90 
91  void operator()(int which_signal);
92 private:
94 };
95 
96 #endif /* DCPSINFOREPOSERV_H */
ACE_Time_Value reassociate_delay_
InitError(const char *msg)
ACE_Thread_Mutex lock_
CORBA::ORB_var orb_
bool servant_finalized_
bool finalized_
Flag to indicate that finalization has already occurred.
char ACE_TCHAR
int listen_address_given_
int init(void)
std::string listen_address_str_
PortableServer::Servant_var< TAO_DDS_DCPSInfo_i > info_servant_
OpenDDS::Federator::ManagerImpl federator_
ACE_TString ior_file_
#define OpenDDS_DCPSInfoRepoServ_Export
ACE_Time_Value dispatch_cleanup_delay_
bool shutdown_complete_
int shutdown(ACE_HANDLE handle, int how)
ACE_Condition_Thread_Mutex cond_
int shutdown_signal_
OpenDDS::Federator::Config federatorConfig_
Repository Federation behaviors.