Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / examples / Event_Comm / supplier.h
blobfeaa231c36cd5c91ef75b6fe02ce099a69518e74
1 //=============================================================================
2 /**
3 * @file supplier.h
5 * This class implements driver for the Publish/Subscribe example
6 */
7 //=============================================================================
9 /**
10 * @class Supplier
12 * @brief Supplier driver for the TAO Publish/Subscribe example.
14 * This class starts up the <Supplier_Input_Handler> and
15 * <Notifier_Handler> objects.
17 class Supplier : public ACE_Event_Handler, public ShutdownCallback
19 public:
20 // Initialization and Termination methods.
21 /// Constructor.
22 Supplier () = default;
24 /// Destructor.
25 ~Supplier () = default;
27 /// Initialization method. returns 0 on success, -1 on error.
28 int init (int argc, ACE_TCHAR *argv[]);
30 /// Execute the supplier.
31 void run ();
33 /// Shutdown the application.
34 virtual void close ();
36 private:
37 /// Handle shutdown signals.
38 virtual int handle_signal (int signum,
39 siginfo_t *,
40 ucontext_t *);
42 /// Handler for keyboard input.
43 Supplier_Input_Handler ih_;
45 /// The notifier handler.
46 Notifier_Handler nh_;