summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-12-31 21:45:42 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-12-31 21:45:42 +0000
commit9b67a932a723b6c5d63446c51b2b2f210b7e9633 (patch)
tree73dacc060ca3b9395fb9d3a67f63f495d4bb279c /TAO/orbsvcs
parent1f1b17ba8799be8881db8267490b4e3b1c4e37c3 (diff)
downloadATCD-9b67a932a723b6c5d63446c51b2b2f210b7e9633.tar.gz
ChangeLogTag:Thu Dec 31 15:28:49 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h104
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h147
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h58
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Filter.h222
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Filter_Builder.h86
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h108
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h130
7 files changed, 855 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h
new file mode 100644
index 00000000000..d68f156b0e9
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h
@@ -0,0 +1,104 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// ORBSVCS Real-time Event Channel
+//
+// = FILENAME
+// EC_ConsumerAdmin
+//
+// = AUTHOR
+// Carlos O'Ryan (coryan@cs.wustl.edu)
+//
+// = DESCRIPTION
+// Implement the RtecEventChannelAdmin::ConsumerAdmin interface.
+// This class is an Abstract Factory for the
+// TAO_EC_ProxyPushSupplier.
+//
+// = CREDITS
+// Based on previous work by Tim Harrison (harrison@cs.wustl.edu)
+// and other members of the DOC group.
+// More details can be found in:
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
+// http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz
+//
+//
+// ============================================================================
+
+#ifndef TAO_EC_PROXYSUPPLIER_H
+#define TAO_EC_PROXYSUPPLIER_H
+
+#include "orbsvcs/Event/EC_Filter.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_EC_Dispatching;
+class TAO_EC_Filter_Builder;
+
+class TAO_EC_ConsumerAdmin : public POA_RtecEventChannelAdmin::ConsumerAdmin
+{
+ // = TITLE
+ // ProxyPushSupplier
+ //
+ // = DESCRIPTION
+ // Implements the ConsumerAdmin interface, i.e. the factory for
+ // ProxyPushSupplier objects.
+ //
+ // = MEMORY MANAGMENT
+ // It does not assume ownership of the TAO_EC_Dispatching object
+ // or the EC_Filter_Builder object.
+ //
+ // = LOCKING
+ // No provisions for locking, access must be serialized
+ // externally.
+ //
+ // = TODO
+ // We don't need to provide a trivial filter, the object itself
+ // could short-circuit the filter() ---> push() cycle when the EC
+ // is properly configured, we need to explore this...
+ //
+public:
+ TAO_EC_ConsumerAdmin (TAO_EC_Dispatching* dispatching,
+ TAO_EC_Filter_Builder* builder);
+ // constructor...
+
+ virtual ~TAO_EC_ConsumerAdmin (void);
+ // destructor...
+
+ virtual void activate (TAO_EC_ProxyPushSupplier* proxy,
+ RtecEventChannelAdmin::ProxyPushSupplier_out objref,
+ CORBA::Environment& env) = 0;
+ virtual void deactivate (TAO_EC_ProxyPushSupplier* proxy,
+ RtecEventChannelAdmin::ProxyPushSupplier_ptr objref,
+ CORBA::Environment& env) = 0;
+
+ // = The RtecEventChannelAdmin::ConsumerAdmin methods...
+ virtual RtecEventChannelAdmin::ProxyPushSupplier_ptr
+ obtain_push_supplier (CORBA::Environment &);
+
+private:
+ TAO_EC_ConsumerAdmin* consumer_admin_;
+ // The consumer admin, used for activation and memory managment.
+
+ TAO_EC_Dispatching *dispatching_;
+ // We delegate on this object to handle
+
+ RtecEventComm::PushConsumer_var consumer_;
+ // The consumer....
+
+ CORBA::Boolean suspended_;
+ // Is this consumer suspended?
+
+ RtecEventChannelAdmin::ConsumerQOS qos_;
+ // The subscription and QoS information...
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_ProxySupplier.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_EC_PROXYSUPPLIER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h
new file mode 100644
index 00000000000..0fecaa31896
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Dispatching.h
@@ -0,0 +1,147 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// ORBSVCS Real-time Event Channel
+//
+// = FILENAME
+// EC_Dispatching
+//
+// = AUTHOR
+// Carlos O'Ryan (coryan@cs.wustl.edu)
+//
+// = DESCRIPTION
+// The dispatching strategies.
+// The EC may be configured with different dispatching strategies,
+// for instance, it can use a pool of threads to dispatch the
+// events, or a set of queues with threads at different priorities
+// for each queue or can simply push the event to the consumer in
+// FIFO order.
+//
+// = CREDITS
+// Based on previous work by Tim Harrison (harrison@cs.wustl.edu)
+// and other members of the DOC group.
+// More details can be found in:
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
+// http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz
+//
+//
+// ============================================================================
+
+#ifndef TAO_EC_FILTER_H
+#define TAO_EC_FILTER_H
+
+#include "orbsvcs/RtecEventComm.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_EC_Dispatching
+{
+ // = TITLE
+ // Abstract base class for the dispatching strategies.
+ //
+ // = DESCRIPTION
+ // Defines the dispatching strategy interface.
+ //
+public:
+ virtual ~TAO_EC_Dispatching (void);
+ // destructor...
+
+ virtual void activate (void) = 0;
+ // Initialize all the data structures, activate any internal threads,
+ // etc.
+
+ virtual void shutdown (void) = 0;
+ // Deactivate any internal threads and cleanup internal data
+ // structures, it should only return once the threads have finished
+ // their jobs.
+
+ virtual void push (TAO_EC_ProxyPushSupplier* proxy,
+ const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env) = 0;
+ // The consumer represented by <proxy> should receive <event>.
+ // It can use the information in <qos_info> to determine the event
+ // priority (among other things).
+};
+
+// ****************************************************************
+
+class TAO_EC_Reactive_Dispatching
+{
+ // = TITLE
+ // Dispatch using the caller thread.
+ //
+ // = DESCRIPTION
+ // The events are dispatched in FIFO ordering, using the invoking
+ // thread to push the event to the consumer.
+ //
+public:
+ TAO_EC_Priority_Dispatching (RtecScheduler::Scheduler_ptr
+ scheduler);
+ // The scheduler is used to find the range of priorities and similar
+ // info.
+
+ // = The EC_Dispatching methods.
+ virtual void activate (void);
+ virtual void shutdown (void);
+ virtual void push (TAO_EC_ProxyPushSupplier* proxy,
+ const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ // @@ proxy->consumer ()->push (event, env);
+
+};
+
+// ****************************************************************
+
+#if 0
+#include "orbsvcs/RtecSchedulerC.h"
+// @@ Move to a separate file, otherwise we have to include the file
+// above everywhere
+class TAO_EC_Priority_Dispatching
+{
+ // = TITLE
+ // Priority based dispatching.
+ //
+ // = DESCRIPTION
+ // The events are processed using a different queue for each
+ // priority; a thread process each queue, each thread runs at a
+ // different OS priority.
+ //
+public:
+ TAO_EC_Priority_Dispatching (RtecScheduler::Scheduler_ptr
+ scheduler);
+ // The scheduler is used to find the range of priorities and similar
+ // info.
+
+ // = The EC_Dispatching methods.
+ virtual void activate (void);
+ virtual void shutdown (void);
+ virtual void push (TAO_EC_ProxyPushSupplier* proxy,
+ const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+
+private:
+ ACE_Thread_Manager thread_manager_;
+ // Use our own thread manager.
+};
+#endif /* 0 */
+
+// @@ TODO
+// We could implement other dispatching strategies, such as:
+// - A single queue with a thread pool to process each event (how does
+// it compare to a thread pool in the ORB?): it should improve
+// throughput when multiple CPUs are present.
+// - Enqueuing, but ordering the queue by priority.
+
+#if defined (__ACE_INLINE__)
+#include "EC_Dispatching.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_EC_DISPATCHING_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h
new file mode 100644
index 00000000000..6d3547370cc
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h
@@ -0,0 +1,58 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// ORBSVCS Real-time Event Channel
+//
+// = FILENAME
+// EC_Event_Channel
+//
+// = AUTHOR
+// Carlos O'Ryan (coryan@cs.wustl.edu)
+//
+// = DESCRIPTION
+// A new implementation of the Real Time Event Services.
+// Based on previous work by Tim Harrison (harrison@cs.wustl.edu)
+// and other members of the DOC group.
+// More details can be found in:
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
+// http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz
+//
+//
+// ============================================================================
+
+#ifndef TAO_EC_EVENT_CHANNEL_H
+#define TAO_EC_EVENT_CHANNEL_H
+
+#include "ace/OS.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_EC_Event_Channel : public POA_RtecEventChannelAdmin::EventChannel
+{
+public:
+ TAO_EC_Event_Channel (TAO_EC_Factory* factory);
+ // constructor
+
+ virtual ~TAO_EC_Event_Channel (void);
+ // destructor
+
+ // = The RtecEventChannelAdmin::EventChannel methods...
+ virtual RtecEventChannelAdmin::ConsumerAdmin_ptr
+ for_consumers (CORBA::Environment& env);
+ virtual RtecEventChannelAdmin::SupplierAdmin_ptr
+ for_suppliers (CORBA::Environment& env);
+
+private:
+ TAO_EC_Factory* factory_;
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_Event_Channel.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_EC_EVENT_CHANNEL_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Filter.h
new file mode 100644
index 00000000000..213ca1f8600
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Filter.h
@@ -0,0 +1,222 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// ORBSVCS Real-time Event Channel
+//
+// = FILENAME
+// EC_Filter
+//
+// = AUTHOR
+// Carlos O'Ryan (coryan@cs.wustl.edu)
+//
+// = DESCRIPTION
+// The per-consumer filtering mechanisms.
+// The EC needs to filter data passed to the consumers, so it can
+// correctly satisfy its subscription requirements.
+// This filtering can include correlations, sequences, timeouts,
+// etc. each consumer can request different filtering criteria.
+//
+// Different filtering objects are associated with each consumer,
+// the filters are organized in a hierarchical structure,
+// corresponding to the subscription "expression" that the events
+// must satisfy.
+// The hierarchy is constructed using the "Builder" pattern.
+//
+// = CREDITS
+// Based on previous work by Tim Harrison (harrison@cs.wustl.edu)
+// and other members of the DOC group.
+// More details can be found in:
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
+// http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz
+//
+//
+// ============================================================================
+
+#ifndef TAO_EC_FILTER_H
+#define TAO_EC_FILTER_H
+
+#include "orbsvcs/RtecEventComm.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_EC_QOS_Info;
+
+class TAO_EC_Filter
+{
+ // = TITLE
+ // Abstract base class for the filter hierarchy.
+ //
+ // = DESCRIPTION
+ // Defines the filter interface.
+ //
+ // = MEMORY MANAGMENT
+ // It does *not* assume ownership of its parent.
+ //
+public:
+ TAO_EC_Filter (void);
+ // constructor...
+
+ virtual ~TAO_EC_Filter (void);
+ // destructor...
+
+ TAO_EC_Filter* parent (void) const;
+ // Obtain the parent of this filter.
+
+ void adopt_child (TAO_EC_Filter* child);
+ // Become the parent of <child>
+
+ static int matches (const RtecEventComm::EventHeader& rhs,
+ const RtecEventComm::EventHeader& lhs);
+ // matches two event headers.
+ // @@ TODO: stragize this...
+
+ virtual int filter (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env) = 0;
+ // Filter this event, returns 1 if the event is accepted, 0
+ // otherwise.
+
+ virtual void push (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env) = 0;
+ // This is called by the children when they accept an event and
+ // which to pass it up.
+
+ virtual void clear (void) = 0;
+ // Clear any saved state, must reset and assume no events have been
+ // received.
+
+ virtual CORBA::ULong max_event_size (void) const = 0;
+ // Returns the maximum size of the events pushed by this filter.
+
+ virtual void event_ids (RtecEventComm::EventHeaderSet& headerset) = 0;
+ // Compute the disjunction of all the event types that could be of
+ // interest for this filter (and its children).
+
+private:
+ TAO_EC_Filter* parent_;
+ // The parent...
+};
+
+// ****************************************************************
+
+class TAO_EC_Trivial_Filter : public TAO_EC_Filter
+{
+ // = TITLE
+ //
+ // = DESCRIPTION
+ //
+ // = MEMORY MANAGMENT
+ //
+public:
+ TAO_EC_Trivial_Filter (void);
+ // constructor.
+
+ // = The TAO_EC_Filter methods, please check the documentation in
+ // TAO_EC_Filter.
+ virtual int filter (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void push (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void clear (void);
+ virtual CORBA::ULong max_event_size (void) const;
+ virtual void event_ids (RtecEventComm::EventHeaderSet& headerset);
+};
+
+// ****************************************************************
+
+class TAO_EC_Disjunction_Filter : public TAO_EC_Filter
+{
+ // = TITLE
+ //
+ // = DESCRIPTION
+ //
+ // = MEMORY MANAGMENT
+ //
+public:
+
+ // = The TAO_EC_Filter methods, please check the documentation in
+ // TAO_EC_Filter.
+ virtual int filter (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void push (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void clear (void);
+ virtual CORBA::ULong max_event_size (void) const;
+ virtual void event_ids (RtecEventComm::EventHeaderSet& headerset);
+};
+
+// ****************************************************************
+
+class TAO_EC_Conjunction_Filter : public TAO_EC_Filter
+{
+ // = TITLE
+ //
+ // = DESCRIPTION
+ //
+ // = MEMORY MANAGMENT
+ //
+public:
+
+ // = The TAO_EC_Filter methods, please check the documentation in
+ // TAO_EC_Filter.
+ virtual int filter (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void push (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void clear (void);
+ virtual CORBA::ULong max_event_size (void) const;
+ virtual void event_ids (RtecEventComm::EventHeaderSet& headerset);
+};
+
+// ****************************************************************
+
+class TAO_EC_Type_Filter : public TAO_EC_Filter
+{
+ // = TITLE
+ //
+ // = DESCRIPTION
+ //
+ // = MEMORY MANAGMENT
+ //
+public:
+
+ // = The TAO_EC_Filter methods, please check the documentation in
+ // TAO_EC_Filter.
+ virtual int filter (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void push (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void clear (void);
+ virtual CORBA::ULong max_event_size (void) const;
+ virtual void event_ids (RtecEventComm::EventHeaderSet& headerset);
+};
+
+// ****************************************************************
+
+// Add more types of filters like:
+// - Events in a sequence.
+// - Events in a sequence with timeouts.
+// - Conjunction with timeout
+// - etc.
+
+// ****************************************************************
+
+#if defined (__ACE_INLINE__)
+#include "EC_Filter.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_EC_FILTER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Filter_Builder.h b/TAO/orbsvcs/orbsvcs/Event/EC_Filter_Builder.h
new file mode 100644
index 00000000000..d208e59db41
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Filter_Builder.h
@@ -0,0 +1,86 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// ORBSVCS Real-time Event Channel
+//
+// = FILENAME
+// EC_Filter_Builder
+//
+// = AUTHOR
+// Carlos O'Ryan (coryan@cs.wustl.edu)
+//
+// = DESCRIPTION
+// The creation of a builder hierarchy is controlled by a
+// Filter_Builder. The relationship between TAO_EC_Filter and
+// TAO_EC_Filter_Builder follows the "Builder Pattern" (Gamma et
+// al.)
+//
+// = CREDITS
+// Based on previous work by Tim Harrison (harrison@cs.wustl.edu)
+// and other members of the DOC group.
+// More details can be found in:
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
+// http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz
+//
+//
+// ============================================================================
+
+#ifndef TAO_EC_FILTER_BUILDER_H
+#define TAO_EC_FILTER_BUILDER_H
+
+#include "orbsvcs/RtecEventChannelAdmin.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_EC_Filter_Builder
+{
+ // = TITLE
+ // Abstract base class for the filter builders.
+ //
+ // = DESCRIPTION
+ // Defines the filter builder interface.
+ //
+public:
+ virtual ~TAO_EC_Filter_Builder (void);
+ // destructor...
+
+ TAO_EC_Filter* build (RtecEventChannelAdmin::ConsumerQOS& qos) const
+ = 0;
+ // Create the filter, the caller must assume ownership of the filter
+ // returned.
+
+};
+
+// ****************************************************************
+
+class TAO_EC_Default_Filter_Builder
+{
+ // = TITLE
+ // A simple implementation of the filter builder.
+ //
+ // = DESCRIPTION
+ // Defines the default filter builder.
+ //
+public:
+ TAO_EC_Default_Filter_Builder (void);
+ // constructor.
+
+ virtual ~TAO_EC_Default_Filter_Builder (void);
+ // destructor...
+
+ // = The TAO_EC_Filter_Builder methods...
+ TAO_EC_Filter* build (RtecEventChannelAdmin::ConsumerQOS& qos) const;
+};
+
+// ****************************************************************
+
+#if defined (__ACE_INLINE__)
+#include "EC_Filter_Builder.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_EC_FILTER_BUILDER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h
new file mode 100644
index 00000000000..f8a6039d1dd
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.h
@@ -0,0 +1,108 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// ORBSVCS Real-time Event Channel
+//
+// = FILENAME
+// EC_ProxyConsumer
+//
+// = AUTHOR
+// Carlos O'Ryan (coryan@cs.wustl.edu)
+//
+// = DESCRIPTION
+// Implement the RtecEventChannelAdmin::ProxyPushConsumer interface,
+// remember that this class is used to communicate with a
+// PushSupplier, so, in effect, this is the ambassador for a
+// supplier inside the event channel.
+//
+// = CREDITS
+// Based on previous work by Tim Harrison (harrison@cs.wustl.edu)
+// and other members of the DOC group.
+// More details can be found in:
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
+// http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz
+//
+//
+// ============================================================================
+
+#ifndef TAO_EC_PROXYCONSUMER_H
+#define TAO_EC_PROXYCONSUMER_H
+
+#include "orbsvcs/Event/EC_Filter.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_EC_Dispatching;
+class TAO_EC_Filter_Builder;
+
+class TAO_EC_ProxyPushConsumer : public TAO_EC_Filter
+{
+ // = TITLE
+ // ProxyPushConsumer
+ //
+ // = DESCRIPTION
+ // Implements the ProxyPushConsumer interface, i.e. the object
+ // used to communicate with a particular consumer.
+ //
+ // = MEMORY MANAGMENT
+ // It makes a copy of the SupplierQOS and the supplier object
+ // reference.
+ // The object commits suicide when disconnect_push_consumer() is
+ // called.
+ //
+ // = LOCKING
+ // No provisions for locking, access must be serialized
+ // externally.
+ //
+public:
+ TAO_EC_ProxyPushConsumer (TAO_EC_SupplierAdmin* supplier_admin);
+ // constructor...
+
+ virtual ~TAO_EC_ProxyPushConsumer (void);
+ // destructor...
+
+ CORBA::Boolean is_connected (void) const;
+ // Return 0 if no supplier is connected...
+
+ RtecEventComm::PushSupplier_ptr supplier (void) const;
+ // Return the consumer object reference. It returns nil() if it has
+ // not connected yet.
+
+ const RtecEventChannelAdmin::SupplierQOS& publications (void) const;
+ // The QoS (subscription) used to connect to the EC.
+
+ virtual void connected (TAO_EC_ProxyPushSupplier* supplier) = 0;
+ virtual void disconnected (TAO_EC_ProxyPushSupplier* supplier) = 0;
+ // Concrete implementations can use this methods to keep track of
+ // the consumers interested in this events.
+
+ // = The RtecEventChannelAdmin::ProxyPushConsumer methods...
+ virtual void connect_push_supplier (
+ RtecEventComm::PushConsumer_ptr push_consumer,
+ const RtecEventChannelAdmin::ConsumerQOS& qos,
+ CORBA::Environment &);
+ virtual void push (const RtecEventComm::EventSet& event,
+ CORBA::Environment &);
+ virtual void disconnect_push_consumer (CORBA::Environment &);
+
+private:
+ TAO_EC_SupplierAdmin* supplier_admin_;
+ // The supplier admin, used for activation and memory managment.
+
+ RtecEventComm::PushSupplier_var supplier_;
+ // The supplier....
+
+ RtecEventChannelAdmin::SupplierQOS qos_;
+ // The publication and QoS information...
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_ProxyConsumer.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_EC_PROXYCONSUMER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h
new file mode 100644
index 00000000000..0517dd28344
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.h
@@ -0,0 +1,130 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// ORBSVCS Real-time Event Channel
+//
+// = FILENAME
+// EC_ProxySupplier
+//
+// = AUTHOR
+// Carlos O'Ryan (coryan@cs.wustl.edu)
+//
+// = DESCRIPTION
+// Implement the RtecEventChannelAdmin::ProxyPushSupplier interface,
+// remember that this class is used to communicate with a
+// PushConsumer, so, in effect, this is the ambassador for a
+// consumer inside the event channel.
+//
+// = CREDITS
+// Based on previous work by Tim Harrison (harrison@cs.wustl.edu)
+// and other members of the DOC group.
+// More details can be found in:
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
+// http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz
+//
+//
+// ============================================================================
+
+#ifndef TAO_EC_PROXYSUPPLIER_H
+#define TAO_EC_PROXYSUPPLIER_H
+
+#include "orbsvcs/Event/EC_Filter.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class TAO_EC_Dispatching;
+class TAO_EC_Filter_Builder;
+
+class TAO_EC_ProxyPushSupplier : public TAO_EC_Filter
+{
+ // = TITLE
+ // ProxyPushSupplier
+ //
+ // = DESCRIPTION
+ // Implements the ProxyPushSupplier interface, i.e. the object
+ // used to communicate with a particular consumer.
+ //
+ // = MEMORY MANAGMENT
+ // This object is reference counted.
+ // It does not assume ownership of the TAO_EC_Dispatching object.
+ // It makes a copy of the ConsumerQOS and the consumer object
+ // reference.
+ //
+ // = LOCKING
+ // No provisions for locking, access must be serialized
+ // externally.
+ //
+ // = TODO
+ // We don't need to provide a trivial filter, the object itself
+ // could short-circuit the filter() ---> push() cycle when the EC
+ // is properly configured, we need to explore this...
+ //
+public:
+ TAO_EC_ProxyPushSupplier (TAO_EC_ConsumerAdmin* consumer_admin,
+ TAO_EC_Dispatching* dispatching,
+ TAO_EC_Filter_Builder* builder);
+ // constructor...
+
+ virtual ~TAO_EC_ProxyPushSupplier (void);
+ // destructor...
+
+ CORBA::Boolean is_connected (void) const;
+ // Return 0 if no consumer is connected...
+
+ CORBA::Boolean is_suspended (void) const;
+ // Return 1 if it is suspended.
+
+ RtecEventComm::PushConsumer_ptr consumer (void) const;
+ // Return the consumer object reference. It returns nil() if it has
+ // not connected yet.
+
+ const RtecEventChannelAdmin::ConsumerQOS& subscriptions (void) const;
+ // The QoS (subscription) used to connect to the EC.
+
+ // = The RtecEventChannelAdmin::ProxyPushSupplier methods...
+ virtual void connect_push_consumer (
+ RtecEventComm::PushConsumer_ptr push_consumer,
+ const RtecEventChannelAdmin::ConsumerQOS& qos,
+ CORBA::Environment &);
+ virtual void disconnect_push_supplier (CORBA::Environment &);
+ virtual void suspend_connection (CORBA::Environment &);
+ virtual void resume_connection (CORBA::Environment &);
+
+ // = The TAO_EC_Filter methods, only push() is implemented...
+ virtual int filter (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void push (const RtecEventComm::EventSet& event,
+ const TAO_EC_QOS_Info& qos_info,
+ CORBA::Environment& env);
+ virtual void clear (void);
+ virtual CORBA::ULong max_event_size (void) const;
+ virtual void event_ids (RtecEventComm::EventHeaderSet& headerset);
+
+private:
+ TAO_EC_ConsumerAdmin* consumer_admin_;
+ // The consumer admin, used for activation and memory managment.
+
+ TAO_EC_Dispatching *dispatching_;
+ // We delegate on this object to handle
+
+ RtecEventComm::PushConsumer_var consumer_;
+ // The consumer....
+
+ CORBA::Boolean suspended_;
+ // Is this consumer suspended?
+
+ RtecEventChannelAdmin::ConsumerQOS qos_;
+ // The subscription and QoS information...
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_ProxySupplier.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_EC_PROXYSUPPLIER_H */