Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / FT_App / ReplicationManagerFaultConsumerAdapter.h
blob5d1aa2aa3ecc30263a97ae5cba0cee55982e4e29
1 // -*- C++ -*-
2 #ifndef REPLICATION_MANAGER_FAULT_CONSUMER_ADAPTER_H
3 #define REPLICATION_MANAGER_FAULT_CONSUMER_ADAPTER_H
4 #include /**/ <ace/pre.h>
5 #include <ace/ACE.h>
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
7 #pragma once
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 #include <orbsvcs/FT_ReplicationManager/FT_FaultConsumer.h>
11 #include <orbsvcs/FT_NotifierC.h>
12 #include <orbsvcs/FT_FaultDetectorFactoryC.h>
13 #include <ace/Vector_T.h>
14 #include <ace/SString.h>
16 /////////////////////
17 // Class declarations
19 /**
20 * An adapter to the Replication Manager's fault consumer
21 * for use in unit testing Fault Notifier and Fault Consumer.
23 class ReplicationManagerFaultConsumerAdapter
25 public:
26 /**
27 * Default constructor.
29 ReplicationManagerFaultConsumerAdapter ();
31 /**
32 * virtual destructor.
34 virtual ~ReplicationManagerFaultConsumerAdapter ();
36 /**
37 * Parse command line arguments.
39 int parse_args (int argc, ACE_TCHAR * argv[]);
41 /**
42 * Initialize this object
44 int init (CORBA::ORB_ptr orb);
46 /**
47 * Return a string to identify this object for logging/console message purposes.
49 const char * identity () const;
51 /**
52 * idle time activity.
53 * @param result [out] status code to return from process
54 * @returns 0 to continue; nonzero to quit
56 int idle(int &result);
58 /**
59 * Clean house for process shut down.
61 int fini ();
64 size_t notifications() const;
66 /////////////////
67 // Implementation
68 private:
69 ////////////////////
70 // Forbidden methods
71 private:
72 ReplicationManagerFaultConsumerAdapter (
73 const ReplicationManagerFaultConsumerAdapter & rhs);
74 ReplicationManagerFaultConsumerAdapter & operator =
75 (const ReplicationManagerFaultConsumerAdapter & rhs);
77 /////////////////////////
78 // Implementation methods
79 private:
80 ///////////////
81 // Data Members
82 private:
83 /**
84 * The orb
86 CORBA::ORB_var orb_;
88 /**
89 * A human-readable string to distinguish this from other FaultConsumers.
91 ACE_CString identity_;
93 /**
94 * boolean: request quit
96 int quit_;
98 /**
99 * a file to write to to signal "ready"
101 const ACE_TCHAR * readyFile_;
104 * Detector's IOR
106 const ACE_TCHAR * detector_ior_;
109 * The FaultDetectorFactory object reference.
111 ::FT::FaultDetectorFactory_var factory_;
114 * A collection of replica IORs
116 ACE_Vector < const char * > replica_iors_;
119 * A collection of replica references.
121 ACE_Vector < FT::PullMonitorable_var > replicas_;
124 * A file from which the notifier's IOR should be read.
126 const ACE_TCHAR * notifier_ior_;
129 * the fault notifier
131 ::FT::FaultNotifier_var notifier_;
134 * consumer id assigned by the notifier
136 ::FT::FaultNotifier::ConsumerId consumerId_;
139 * the real fault consumer
141 TAO::FT_FaultConsumer* p_fault_consumer_;
142 PortableServer::ServantBase_var consumer_servant_;
144 #include /**/ <ace/post.h>
146 #endif /* REPLICATION_MANAGER_FAULT_CONSUMER_ADAPTER_H */