summaryrefslogtreecommitdiff
path: root/TAO/examples/Event_Comm/notifier.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-14 08:34:01 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-14 08:34:01 +0000
commit12521f45cd85d2e89125c532bdb0df62409bf164 (patch)
tree832e81ec9b3c5b3b540d569bb4526b23c848c6b2 /TAO/examples/Event_Comm/notifier.cpp
parent8f4d76cd59b787031f27fb40c2e3c473e86a3834 (diff)
downloadATCD-ACE-4_6_13.tar.gz
This commit was manufactured by cvs2svn to create tag 'ACE-4_6_13'.ACE-4_6_13
Diffstat (limited to 'TAO/examples/Event_Comm/notifier.cpp')
-rw-r--r--TAO/examples/Event_Comm/notifier.cpp98
1 files changed, 0 insertions, 98 deletions
diff --git a/TAO/examples/Event_Comm/notifier.cpp b/TAO/examples/Event_Comm/notifier.cpp
deleted file mode 100644
index b583931699f..00000000000
--- a/TAO/examples/Event_Comm/notifier.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-#include "Notifier_Server.h"
-
-ACE_RCSID(Notifier, notifier, "$Id$")
-
-class Notifier : public ACE_Event_Handler
-{
- // = TITLE
- // Notifier driver for the TAO Publish/Subscribe example.
- //
- // = DESCRIPTION
- // The driver class for the <Event_Comm::Notifier> object.
-public:
- // = Initialization and termination methods.
- Notifier (int argc, char *argv[]);
- // Constructor.
-
- ~Notifier (void);
- // Destructor.
-
- void run (void);
- // Execute the notifier.
-
-private:
- virtual int handle_signal (int signum,
- siginfo_t *,
- ucontext_t *);
- // Handle signals that shut us down.
-
- Notifier_Server ns_;
- // The notifier server.
-};
-
-int
-Notifier::handle_signal (int signum, siginfo_t *, ucontext_t *)
-{
- ACE_DEBUG ((LM_DEBUG,
- "got signal in handle_signal %S\n",
- signum));
-
- // Tell the <Notifier_Server> to shut down the ORB.
- ns_.close ();
- return 0;
-}
-
-void
-Notifier::run (void)
-{
- TAO_TRY
- {
- ns_.run (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- return;
- }
- TAO_ENDTRY;
-}
-
-Notifier::Notifier (int argc, char *argv[])
-{
- TAO_TRY
- {
- ns_.init (argc, argv, TAO_TRY_ENV);
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Notifier_Server.init failed\n ");
- }
- TAO_ENDTRY;
-
- // Register with the ORB's Reactor to receive a signal to shut us
- // down.
- if (ns_.reactor ()->register_handler (SIGINT, this) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n",
- "register_handler"));
-}
-
-Notifier::~Notifier (void)
-{
- // Cleanup.
- this->ns_.close ();
-}
-
-int
-main (int argc, char *argv[])
-{
- // Initialize server daemon.
- Notifier notifier (argc, argv);
-
- // Loop forever handling events.
- notifier.run ();
-
- return 0;
-}