2 #ifndef STUBFAULTANALYZER_H
3 #define STUBFAULTANALYZER_H
4 #include /**/ <ace/pre.h>
7 #if !defined (ACE_LACKS_PRAGMA_ONCE)
9 #endif /* ACE_LACKS_PRAGMA_ONCE */
11 #include "StubFaultConsumer.h"
12 #include "StubBatchConsumer.h"
13 #include <orbsvcs/FT_NotifierC.h>
14 #include <orbsvcs/FT_FaultDetectorFactoryC.h>
16 #include "ace/Vector_T.h"
17 #include "ace/SString.h"
19 //////////////////////
26 * A stub fault analyzer for use in unit testing.
28 class StubFaultAnalyzer
32 * Default constructor.
39 ~StubFaultAnalyzer ();
42 * Parse command line arguments.
44 int parse_args (int argc
, ACE_TCHAR
* argv
[]);
47 * Initialize this object
49 int init (CORBA::ORB_ptr orb
);
52 * Return a string to identify this object for logging/console message purposes.
54 const char * identity () const;
58 * @param result [out] status code to return from process
59 * @returns 0 to continue; nonzero to quit
61 int idle(int &result
);
65 * @return zero for success; nonzero is process return code for failure.
72 int readIORFile(const ACE_TCHAR
* fileName
, CORBA::String_var
& ior
);
83 * The POA used to activate this object.
85 PortableServer::POA_var poa_
;
88 * The CORBA object id assigned to this object.
90 PortableServer::ObjectId_var objectId_
;
93 * A human-readable string to distinguish this from other Notifiers.
95 ACE_CString identity_
;
98 * a file to write to to signal "ready"
100 const ACE_TCHAR
* readyFile_
;
103 * The detector's IOR (-d option)
105 const ACE_TCHAR
* detector_ior_
;
107 ::FT::FaultDetectorFactory_var factory_
;
110 * The notifier's IOR (-n option)
112 const ACE_TCHAR
* notifier_ior_
;
114 ::FT::FaultNotifier_var notifier_
;
117 * A collection of files containing replica IORs
119 ACE_Vector
< const char * > replicaIORs
;
121 ACE_Vector
< FT::PullMonitorable_var
> replicas_
;
124 StubFaultConsumer faultConsumer_
;
125 StubBatchConsumer batchConsumer_
;
129 #include /**/ <ace/post.h>
131 #endif /* STUBFAULTANALYZER_H */