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 ();
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.
74 virtual void push_structured_events (
75 const CosNotification::EventBatch
& notifications
);
77 virtual void disconnect_sequence_push_consumer ();
79 virtual void offer_change (
80 const CosNotification::EventTypeSeq
& added
,
81 const CosNotification::EventTypeSeq
& removed
);
86 StubBatchConsumer (const StubBatchConsumer
& rhs
);
87 StubBatchConsumer
& operator = (const StubBatchConsumer
& rhs
);
89 /////////////////////////
90 // Implementation methods
101 * The POA used to activate this object.
103 PortableServer::POA_var poa_
;
106 * The CORBA object id assigned to this object.
108 PortableServer::ObjectId_var object_id_
;
111 * A human-readable string to distinguish this from other FaultConsumers.
113 ACE_CString identity_
;
116 * boolean: request quit
123 ::FT::FaultNotifier_var notifier_
;
126 * consumer id assigned by the notifier
128 ::FT::FaultNotifier::ConsumerId consumer_id_
;
131 #include /**/ <ace/post.h>
133 #endif /* STUBBATCHCONSUMER_H */