Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / examples / Event_Comm / supplier.h
blob7260496811a2e120c8c10c171e4b98d0ed222d71
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file supplier.h
7 * This class implements driver for the Publish/Subscribe example
8 */
9 //=============================================================================
13 /**
14 * @class Supplier
16 * @brief Supplier driver for the TAO Publish/Subscribe example.
18 * This class starts up the <Supplier_Input_Handler> and
19 * <Notifier_Handler> objects.
21 class Supplier : public ACE_Event_Handler, public ShutdownCallback
23 public:
24 // Initialization and Termination methods.
25 /// Constructor.
26 Supplier (void);
28 /// Destructor.
29 ~Supplier (void);
31 /// Initialization method. returns 0 on success, -1 on error.
32 int init (int argc, ACE_TCHAR *argv[]);
34 /// Execute the supplier.
35 void run (void);
37 /// Shutdown the application.
38 virtual void close (void);
40 private:
41 /// Handle shutdown signals.
42 virtual int handle_signal (int signum,
43 siginfo_t *,
44 ucontext_t *);
46 /// Handler for keyboard input.
47 Supplier_Input_Handler ih_;
49 /// The notifier handler.
50 Notifier_Handler nh_;