summaryrefslogtreecommitdiff
path: root/apps/Orbix-Examples/Event_Comm/Consumer
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Orbix-Examples/Event_Comm/Consumer')
-rw-r--r--apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.cpp130
-rw-r--r--apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.h71
-rw-r--r--apps/Orbix-Examples/Event_Comm/Consumer/Makefile165
-rw-r--r--apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.cpp114
-rw-r--r--apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.h62
-rw-r--r--apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp114
6 files changed, 0 insertions, 656 deletions
diff --git a/apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.cpp b/apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.cpp
deleted file mode 100644
index 004b54d6fd5..00000000000
--- a/apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-#include "Input_Handler.h"
-// $Id$
-
-#include "Notification_Receiver_Handler.h"
-
-#if defined (ACE_HAS_ORBIX)
-
-Input_Handler::~Input_Handler (void)
-{
- ACE_DEBUG ((LM_DEBUG, "closing down Input_Handler::~Input_Handler\n"));
- this->handle_close ();
-}
-
-int
-Input_Handler::consumer_initiated_shutdown (void)
-{
- return this->consumer_initiated_shutdown_;
-}
-
-void
-Input_Handler::consumer_initiated_shutdown (int c)
-{
- this->consumer_initiated_shutdown_ = c;
-}
-
-ACE_HANDLE
-Input_Handler::get_handle (void) const
-{
- return this->handle_;
-}
-
-int
-Input_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_DEBUG ((LM_DEBUG, "closing down Consumer::Input_Handler\n"));
-
- Event_Comm::Notification_Receiver *receiver = this->receiver_handler_->receiver ();
- Event_Comm::Notifier *notifier = this->receiver_handler_->notifier ();
-
- if (this->consumer_initiated_shutdown ())
- {
- // Only try to unsubscribe if the Consumer initiated the
- // shutdown. Otherwise, the Supplier initiated it and
- // it has probably gone away by now!
- TRY {
- // Gracefully shutdown the Receiver by removing it
- // from the Notifier's internal map.
-
- notifier->unsubscribe (receiver, "", IT_X);
- } CATCHANY {
- cerr << IT_X << endl;
- } ENDTRY;
- }
- // Don't execute a callback here otherwise we'll recurse indefinitely!
- if (ACE_Service_Config::reactor ()->remove_handler (this, ACE_Event_Handler::READ_MASK
- | ACE_Event_Handler::DONT_CALL) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "remove_handler"));
-
- // *Must* be allocated dyanmically!
- delete (void *) this;
- return 0;
-}
-
-Input_Handler::Input_Handler (Notification_Receiver_Handler *ch,
- ACE_HANDLE handle)
- : receiver_handler_ (ch),
- handle_ (handle),
- consumer_initiated_shutdown_ (0)
-{
- if (ACE_Service_Config::reactor ()->register_handler (this,
- ACE_Event_Handler::READ_MASK) == -1)
- ACE_ERROR ((LM_ERROR, "Input_Handler::Input_Handler\n"));
-}
-
-int
-Input_Handler::handle_input (ACE_HANDLE h)
-{
- char buf[BUFSIZ];
- ssize_t n;
-
- // Read up to BUFSIZ worth of data from ACE_HANDLE h.
-
- n = ACE_OS::read (h, buf, sizeof buf - 1);
-
- if (n > 0)
- {
- // Null terminate the buffer, replacing the '\n' with '\0'.
- if (buf[n - 1] == '\n' || buf[n - 1] == EOF)
- buf[n - 1] = '\0';
- else
- buf[n] = '\0';
- ACE_DEBUG ((LM_DEBUG, "notifying for event %s\n", buf));
-
- }
- else
- {
- ACE_OS::strcpy (buf, "quit");
- ACE_DEBUG ((LM_DEBUG, "shutting down Input_Handler\n"));
- }
-
- Event_Comm::Notifier *notifier = this->receiver_handler_->notifier ();
-
- ACE_ASSERT (notifier != 0);
-
- if (ACE_OS::strcmp (buf, "quit") == 0)
- {
- // Consumer wants to shutdown.
- this->consumer_initiated_shutdown (1);
-
- // Tell the main event loop to shutdown.
- ACE_Service_Config::end_reactor_event_loop ();
- }
- else
- {
- TRY {
- Event_Comm::Notification notification;
-
- notification.tag_ = ACE_OS::strdup (buf);
-
- notifier->send_notification (notification, IT_X);
- }
- CATCHANY {
- cerr << "Unexpected exception " << IT_X << endl;
- } ENDTRY;
- }
-
- /* NOTREACHED */
- return 0;
-}
-#endif /* ACE_HAS_ORBIX */
diff --git a/apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.h b/apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.h
deleted file mode 100644
index 673965adacb..00000000000
--- a/apps/Orbix-Examples/Event_Comm/Consumer/Input_Handler.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// EventComm
-//
-// = FILENAME
-// Input_Handler.h
-//
-// = DESCRIPTION
-// Subclass of ACE ACE_Service_Object that receives unsubscribes from
-// the Notifier when input is received from the keyboard.
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu)
-//
-// ============================================================================
-
-#if !defined (_INPUT_HANDLER_H)
-#define _INPUT_HANDLER_
-
-#include "ace/Service_Config.h"
-
-#if defined (ACE_HAS_ORBIX)
-// Forward declaration.
-class Notification_Receiver_Handler;
-
-class Input_Handler : public ACE_Service_Object
- // = TITLE
- // Handles input events generated from a keyboard.
- //
- // = DESCRIPTION
-{
-public:
- Input_Handler (Notification_Receiver_Handler *, ACE_HANDLE h = 0);
-
- virtual int handle_input (ACE_HANDLE);
- // Dispatch the callback when events occur.
-
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK);
- // Close down the handler.
-
- int consumer_initiated_shutdown (void);
- // Report whether the Consumer initiated the shutdown.
-
- void consumer_initiated_shutdown (int);
- // Indicate that the Consumer initiated the shutdown.
-
-private:
- ~Input_Handler (void);
- // Ensure dynamic allocation.
-
- virtual ACE_HANDLE get_handle (void) const;
-
- ACE_HANDLE handle_;
- // ACE_HANDLE where the input comes from.
-
- Notification_Receiver_Handler *receiver_handler_;
- // Pointer to the <Notification_Receiver_Handler> that
- // receives notifications from the <Event_Comm::Notifier>.
-
- int consumer_initiated_shutdown_;
- // Keep track of whether the Consumer initiated the shutdown.
-};
-
-#endif /* ACE_HAS_ORBIX */
-#endif /* _INPUT_HANDLER_H */
diff --git a/apps/Orbix-Examples/Event_Comm/Consumer/Makefile b/apps/Orbix-Examples/Event_Comm/Consumer/Makefile
deleted file mode 100644
index 872b72a1880..00000000000
--- a/apps/Orbix-Examples/Event_Comm/Consumer/Makefile
+++ /dev/null
@@ -1,165 +0,0 @@
-#----------------------------------------------------------------------------
-# @(#)Makefile 1.1 10/18/96
-#
-# Makefile for the Consumer.
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-BIN = consumer
-
-FILES = Notification_Receiver_Handler \
- Input_Handler
-
-LSRC = $(addsuffix .cpp,$(FILES)) consumer.cpp
-LOBJ = $(addsuffix .o,$(FILES))
-SHOBJ = $(addsuffix .so,$(FILES))
-
-SRX = ../src/.obj
-
-LDLIBS = $(addprefix .shobj/,$(LOBJ)) ../src/libEvent_Comm.a
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-BUILD = $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU
-include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-CPPFLAGS += -I../include
-VLDLIBS += -lgen
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-Notification_Receiver_Handler.o: Notification_Receiver_Handler.cpp \
- Notification_Receiver_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/CORBA_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Config.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Reactor.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Handle_Set.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/sysincludes.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/config.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Handle_Set.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Timer_Queue.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Event_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Time_Value.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Synch.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Synch_T.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Timer_Queue.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Signal.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Set.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Token.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Reactor.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Msg.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Record.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Priority.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Record.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Msg.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Specific.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Specific.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Object.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Shared_Object.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Record.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Manager.h \
- ../include/Event_Comm_i.h ../include/Notification_Receiver_i.h \
- ../include/Notifier_i.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Map_Manager.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/SString.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/SString.i \
- ../include/Event_Comm.hh
-Input_Handler.o: Input_Handler.cpp Input_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Config.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Reactor.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Handle_Set.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/sysincludes.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/config.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Handle_Set.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Timer_Queue.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Event_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Time_Value.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Synch.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Synch_T.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Timer_Queue.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Signal.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Set.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Token.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Reactor.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Msg.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Record.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Priority.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Record.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Msg.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Specific.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Specific.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Object.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Shared_Object.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Record.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Manager.h \
- Notification_Receiver_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/CORBA_Handler.h \
- ../include/Event_Comm_i.h ../include/Notification_Receiver_i.h \
- ../include/Notifier_i.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Map_Manager.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/SString.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/SString.i \
- ../include/Event_Comm.hh
-consumer.o: consumer.cpp \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Msg.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Record.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/sysincludes.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/config.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Priority.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Record.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Log_Msg.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Specific.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Synch.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Time_Value.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Synch_T.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Specific.i \
- Notification_Receiver_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/CORBA_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Config.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Reactor.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Handle_Set.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Handle_Set.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Timer_Queue.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Event_Handler.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Timer_Queue.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Signal.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Set.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Token.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Reactor.i \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Object.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Shared_Object.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Service_Record.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Thread_Manager.h \
- ../include/Event_Comm_i.h ../include/Notification_Receiver_i.h \
- ../include/Notifier_i.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/Map_Manager.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/SString.h \
- /project/adaptive/ACE_wrappers/build/SunOS5.4/include/ace/SString.i \
- ../include/Event_Comm.hh Input_Handler.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.cpp b/apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.cpp
deleted file mode 100644
index 5eca7a7e853..00000000000
--- a/apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-#include "Notification_Receiver_Handler.h"
-// $Id$
-
-
-#if defined (ACE_HAS_ORBIX)
-
-#if defined (ACE_HAS_MT_ORBIX)
-typedef ACE_MT_CORBA_Handler CORBA_HANDLER;
-#else
-typedef ACE_ST_CORBA_Handler CORBA_HANDLER;
-#endif /* ACE_HAS_MT_ORBIX */
-
-int
-Notification_Receiver_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
-// ACE_ST_CORBA_Handler::remove_service (Event_Comm_Notification_Receiver_IMPL);
-
- if (this->receiver_ != 0)
- {
- ACE_DEBUG ((LM_DEBUG, "closing down Notification_Receiver_Handler\n"));
- CORBA_HANDLER::instance ()->deactivate_service (Event_Comm_Notification_Receiver_IMPL,
- this->receiver_->_marker ());
- CORBA::release (this->receiver_);
- this->receiver_ = 0;
- CORBA::release (this->notifier_);
- this->notifier_ = 0;
- // *Must* be allocated dynamically in order to delete this!
- delete this;
- }
- return 0;
-}
-
-Notification_Receiver_Handler::Notification_Receiver_Handler (int argc, char *argv[])
- : notifier_ (0),
- receiver_ (0)
-{
- const char *server_name = Event_Comm_Notification_Receiver_IMPL;
- char buf[BUFSIZ];
- char *receiver_marker = buf;
- char *filtering_criteria;
- char *host;
- char *notifier_marker;
- char *service_location = argv[0];
-
- // First see if we have any environment variables.
- filtering_criteria = ACE_OS::getenv ("FILTERING_CRITERIA");
- host = ACE_OS::getenv ("HOST");
- notifier_marker = ACE_OS::getenv ("NOTIFIER_MARKER");
-
- // Then override these variables with command-line arguments.
- filtering_criteria = argc > 1 ? argv[1] : "";
- host = argc > 2 ? argv[2] : "tango.cs";
- notifier_marker = argc > 3 ? argv[3] : "notifier:" Event_Comm_Notifier_IR;
-
- CORBA::Orbix.setDiagnostics (0);
-
- struct utsname name;
-
- // Make the marker name be the "/hostname/processid"
- ACE_OS::uname (&name);
- sprintf (buf, "/%s/%d", name.nodename, ACE_OS::getpid ());
-
- CORBA_HANDLER::instance ()->activate_service (Event_Comm_Notification_Receiver_IMPL,
- receiver_marker, service_location);
-
- // Create the receiver object.
- this->receiver_ = new TIE_Event_Comm_Notification_Receiver (Notification_Receiver_i)
- (new Notification_Receiver_i);
-
- this->receiver_->_marker (receiver_marker);
-
- ACE_ASSERT (this->receiver_);
-
- TRY {
- // Get a binding to the notifier.
- this->notifier_ = Event_Comm::Notifier::_bind (notifier_marker, host, IT_X);
-
- if (this->notifier_ != CORBA::OBJECT_NIL)
- // Subscribe ourselves with the notifier's broker.
- this->notifier_->subscribe (this->receiver_,
- filtering_criteria, IT_X);
- } CATCHANY {
- cerr << "Unexpected exception " << IT_X << endl;
- ACE_OS::exit (1);
- } ENDTRY;
- // Print out context.
-
- receiver_marker = (char *) this->receiver_->_marker ();
- CORBA::BOA::activationMode mode = CORBA::Orbix.myActivationMode ();
- ACE_DEBUG ((LM_DEBUG, "starting up a %spersistent server in mode %d with marker name %s\n",
- mode == CORBA::BOA::persistentActivationMode ? "" : "non-",
- mode, receiver_marker));
-}
-
-Event_Comm::Notification_Receiver *
-Notification_Receiver_Handler::receiver (void)
-{
- return this->receiver_;
-}
-
-Event_Comm::Notifier *
-Notification_Receiver_Handler::notifier (void)
-{
- return this->notifier_;
-}
-
-// Destroy a Receiver target object.
-
-Notification_Receiver_Handler::~Notification_Receiver_Handler (void)
-{
- this->handle_close (-1, ACE_Event_Handler::RWE_MASK);
-}
-
-#endif /* ACE_HAS_ORBIX */
diff --git a/apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.h b/apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.h
deleted file mode 100644
index a676b84e2f3..00000000000
--- a/apps/Orbix-Examples/Event_Comm/Consumer/Notification_Receiver_Handler.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// EventComm
-//
-// = FILENAME
-// Notifier_Receiver_Handler.h
-//
-// = DESCRIPTION
-// Subclass of Corba_Handler that sets up the Notification_Receiver handler
-// for use with the ACE ACE_Reactor.
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu)
-//
-// ============================================================================
-
-#if !defined (_NOTIFICATION_RECEIVER_HANDLER_H)
-#define _NOTIFICATION_RECEIVER_HANDLER_H
-
-#include "ace/CORBA_Handler.h"
-#include "Event_Comm_i.h"
-
-#if defined (ACE_HAS_ORBIX)
-
-class Notification_Receiver_Handler
- // = TITLE
- // Subclass of Corba_Handler that sets up the Notification Receiver handler
- // for use with the ACE ACE_Reactor.
- //
- // = DESCRIPTION
- // Note that this class doesn't inherit from ACE_ST_CORBA_Handler (unlike
- // the Supplier's Notifier_Handler class). Instead, it uses an
- // alternative interface that can be called directly.
-{
-public:
- Notification_Receiver_Handler (int argc, char *argv[]);
-
- Event_Comm::Notification_Receiver *receiver (void);
- Event_Comm::Notifier *notifier (void);
-
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK);
- // Close down the handler.
-
-private:
- ~Notification_Receiver_Handler (void);
- // Ensure dynamic allocation.
-
- Event_Comm::Notification_Receiver *receiver_;
- // Pointer to an IDL <Notification_Receiver> proxy object.
-
- Event_Comm::Notifier *notifier_;
- // Pointer to an IDL <Notifier> proxy object.
-};
-
-#endif /* ACE_HAS_ORBIX */
-#endif /* _NOTIFICATION_RECEIVER_HANDLER_H */
diff --git a/apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp b/apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp
deleted file mode 100644
index 73717f66bd3..00000000000
--- a/apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Consumer driver for the Orbix Notification example.
-
-
-#include "Notification_Receiver_Handler.h"
-#include "Input_Handler.h"
-
-#if defined (ACE_HAS_ORBIX)
-
-class Consumer : public ACE_Event_Handler
-{
-public:
- Consumer (int argc, char *argv[]);
- ~Consumer (void);
-
- void run (void);
- // Execute the consumer;
-
-private:
- virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
-
- virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
-
- Input_Handler *ih_;
- // Handler for keyboard input.
-
- Notification_Receiver_Handler *nrh_;
- // Handler for CORBA Consumer.
-
- ACE_Service_Config daemon_;
- // ACE server event-loop mechanism.
-};
-
-int
-Consumer::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_DEBUG ((LM_DEBUG, "closing down Consumer\n"));
- return 0;
-}
-
-int
-Consumer::handle_signal (int signum, siginfo_t *, ucontext_t *)
-{
- ACE_DEBUG ((LM_DEBUG, "%S\n", signum));
-
- // Indicate that the consumer initiated the shutdown.
- this->ih_->consumer_initiated_shutdown (1);
-
- // Shut down the event loop.
- ACE_Service_Config::end_reactor_event_loop ();
- return 0;
-}
-
-// Run the event loop until someone calls
-// calls ACE_Service_Config::end_reactor_event_loop().
-
-void
-Consumer::run (void)
-{
- if (ACE_Service_Config::run_reactor_event_loop () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "run_reactor_event_loop"));
-}
-
-Consumer::Consumer (int argc, char *argv[])
- : ih_ (0),
- nrh_ (0)
-{
- // Initialize the server.
- if (this->daemon_.open (argc, argv) == -1)
- {
- if (errno == ENOENT) // There's no svc.conf file, so use static linking...
- {
- ACE_DEBUG ((LM_DEBUG, "no config file, using static binding\n"));
- // The constructor registers the handlers...
- this->nrh_ = new Notification_Receiver_Handler (argc, argv);
- ACE_ASSERT (this->nrh_ != 0);
- this->ih_ = new Input_Handler (this->nrh_);
- ACE_ASSERT (this->ih_ != 0);
- }
- else
- ACE_ERROR ((LM_ERROR, "%p\n%a", "open", 1));
- }
-
- if (ACE_Service_Config::reactor ()->register_handler (SIGINT, this) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "register_handler"));
-}
-
-Consumer::~Consumer (void)
-{
- // Free up the handlers if they were statically bound.
- this->ih_->handle_close ();
- this->nrh_->handle_close ();
-}
-
-int
-main (int argc, char *argv[])
-{
- // Initialize the supplier and consumer object references.
- Consumer consumer (argc, argv);
-
- // Loop forever handling events.
- consumer.run ();
-
- return 0;
-}
-#else /* !defined ACE_HAS_ORBIX */
-int
-main (int argc, char *argv[])
-{
- ACE_ERROR_RETURN ((LM_ERROR, "you must have Orbix to run application %s\n", argv[0]), 1);
-}
-#endif /* ACE_HAS_ORBIX */