Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / tests / FT_App / StubBatchConsumer.h
blobaedc1a399cb0dfb6044a7e097f4e06245820edc7
1 // -*- C++ -*-
2 #ifndef STUBBATCHCONSUMER_H
3 #define STUBBATCHCONSUMER_H
4 #include /**/ <ace/pre.h>
5 #include <ace/ACE.h>
7 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 #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 //////////////////////
17 // Forward references
19 /////////////////////
20 // Class declarations
22 /**
23 * A stub fault consumer for use in unit testing Fault Notifier.
25 class StubBatchConsumer
26 : public virtual POA_CosNotifyComm::SequencePushConsumer
28 public:
29 /**
30 * Default constructor.
32 StubBatchConsumer ();
34 /**
35 * virtual destructor.
37 virtual ~StubBatchConsumer ();
39 ::PortableServer::POA_ptr _default_POA (void);
40 ::PortableServer::ObjectId objectId()const;
42 /**
43 * Parse command line arguments.
45 int parse_args (int argc, ACE_TCHAR * argv[]);
47 /**
48 * Publish this objects IOR.
50 int init (CORBA::ORB_ptr orbManager, ::FT::FaultNotifier_var & notifier);
52 /**
53 * Return a string to identify this object for logging/console message purposes.
55 const char * identity () const;
57 /**
58 * idle time activity.
59 * @param result [out] status code to return from process
60 * @returns 0 to continue; nonzero to quit
62 int idle(int &result);
64 /**
65 * Clean house for process shut down.
67 void fini (void);
70 public:
72 ////////////////
73 // CORBA methods
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
87 ////////////////////
88 // Forbidden methods
89 private:
90 StubBatchConsumer (const StubBatchConsumer & rhs);
91 StubBatchConsumer & operator = (const StubBatchConsumer & rhs);
93 /////////////////////////
94 // Implementation methods
95 private:
97 ///////////////
98 // Data Members
99 private:
101 * The orb
103 CORBA::ORB_var orb_;
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
123 int quit_;
126 * the notifier
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 */