2 #ifndef STUBBATCHCONSUMER_H
3 #define STUBBATCHCONSUMER_H
4 #include /**/ <ace/pre.h>
7 #if !defined (ACE_LACKS_PRAGMA_ONCE)
9 #endif /* ACE_LACKS_PRAGMA_ONCE */
11 #include <orbsvcs/CosNotifyChannelAdminS.h>
12 #include <orbsvcs/FT_NotifierC.h>
14 #include "ace/SString.h"
16 //////////////////////
23 * A stub fault consumer for use in unit testing Fault Notifier.
25 class StubBatchConsumer
26 : public virtual POA_CosNotifyComm::SequencePushConsumer
30 * Default constructor.
37 virtual ~StubBatchConsumer ();
39 ::PortableServer::POA_ptr
_default_POA (void);
40 ::PortableServer::ObjectId
objectId()const;
43 * Parse command line arguments.
45 int parse_args (int argc
, ACE_TCHAR
* argv
[]);
48 * Publish this objects IOR.
50 int init (CORBA::ORB_ptr orbManager
, ::FT::FaultNotifier_var
& notifier
);
53 * Return a string to identify this object for logging/console message purposes.
55 const char * identity () const;
59 * @param result [out] status code to return from process
60 * @returns 0 to continue; nonzero to quit
62 int idle(int &result
);
65 * Clean house for process shut down.
75 virtual void push_structured_events (
76 const CosNotification::EventBatch
& notifications
79 virtual void disconnect_sequence_push_consumer (
82 virtual void offer_change (
83 const CosNotification::EventTypeSeq
& added
,
84 const CosNotification::EventTypeSeq
& removed
90 StubBatchConsumer (const StubBatchConsumer
& rhs
);
91 StubBatchConsumer
& operator = (const StubBatchConsumer
& rhs
);
93 /////////////////////////
94 // Implementation methods
106 * The POA used to activate this object.
108 PortableServer::POA_var poa_
;
111 * The CORBA object id assigned to this object.
113 PortableServer::ObjectId_var object_id_
;
116 * A human-readable string to distinguish this from other FaultConsumers.
118 ACE_CString identity_
;
121 * boolean: request quit
128 ::FT::FaultNotifier_var notifier_
;
131 * consumer id assigned by the notifier
133 ::FT::FaultNotifier::ConsumerId consumer_id_
;
136 #include /**/ <ace/post.h>
138 #endif /* STUBBATCHCONSUMER_H */