EC_Trivial_Supplier_Filter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_Trivial_Supplier_Filter.h
00005  *
00006  *  $Id: EC_Trivial_Supplier_Filter.h 76589 2007-01-25 18:04:11Z elliott_c $
00007  *
00008  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00009  *
00010  * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and
00011  * other members of the DOC group. More details can be found in:
00012  *
00013  * http://doc.ece.uci.edu/~coryan/EC/index.html
00014  */
00015 
00016 #ifndef TAO_EC_TRIVIAL_SUPPLIER_FILTER_H
00017 #define TAO_EC_TRIVIAL_SUPPLIER_FILTER_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "orbsvcs/Event/EC_Supplier_Filter.h"
00022 #include "orbsvcs/Event/EC_Supplier_Filter_Builder.h"
00023 
00024 #include /**/ "orbsvcs/Event/event_serv_export.h"
00025 
00026 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00027 # pragma once
00028 #endif /* ACE_LACKS_PRAGMA_ONCE */
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 class TAO_EC_Event_Channel_Base;
00033 class TAO_EC_ProxyPushSupplier_Set;
00034 
00035 // ****************************************************************
00036 
00037 /**
00038  * @class TAO_EC_Trivial_Supplier_Filter
00039  *
00040  * @brief A null filtering strategy.
00041  *
00042  * This strategy does no filtering, it is useful for backends of
00043  * the CosEventChannel, testing and broadcasters; it uses the
00044  * ConsumerAdmin to find all the consumers and pushes the event to
00045  * all of them.
00046  */
00047 class TAO_RTEvent_Serv_Export TAO_EC_Trivial_Supplier_Filter : public TAO_EC_Supplier_Filter
00048 {
00049 public:
00050   /// Constructor
00051   TAO_EC_Trivial_Supplier_Filter (TAO_EC_Event_Channel_Base* ec);
00052 
00053   // = The TAO_EC_Supplier_Filter methods.
00054   virtual void bind (TAO_EC_ProxyPushConsumer* consumer);
00055   virtual void unbind (TAO_EC_ProxyPushConsumer* consumer);
00056   virtual void connected (TAO_EC_ProxyPushSupplier* supplier);
00057   virtual void reconnected (TAO_EC_ProxyPushSupplier* supplier);
00058   virtual void disconnected (TAO_EC_ProxyPushSupplier* supplier);
00059   virtual void shutdown (void);
00060   virtual void push (const RtecEventComm::EventSet& event,
00061                      TAO_EC_ProxyPushConsumer *consumer);
00062   virtual void push_scheduled_event (RtecEventComm::EventSet &event,
00063                                      const TAO_EC_QOS_Info &event_info);
00064   virtual CORBA::ULong _decr_refcnt (void);
00065   virtual CORBA::ULong _incr_refcnt (void);
00066 
00067 private:
00068   /// The event channel, used to locate the set of consumers.
00069   TAO_EC_Event_Channel_Base *event_channel_;
00070 };
00071 
00072 // ****************************************************************
00073 
00074 /**
00075  * @class TAO_EC_Trivial_Supplier_Filter_Builder
00076  *
00077  * @brief Create a single Trivial_Supplier_Filter.
00078  *
00079  * This Factory creates a single Trivial_Supplier_Filter that is
00080  * used by all the suppliers (i.e. ProxyConsumers) of an event
00081  * channel.
00082  */
00083 class TAO_RTEvent_Serv_Export TAO_EC_Trivial_Supplier_Filter_Builder : public TAO_EC_Supplier_Filter_Builder
00084 {
00085 public:
00086   /// constructor....
00087   TAO_EC_Trivial_Supplier_Filter_Builder (TAO_EC_Event_Channel_Base* ec);
00088 
00089   // = The TAO_EC_Supplier_Filter_Builder methods...
00090   virtual TAO_EC_Supplier_Filter*
00091       create (RtecEventChannelAdmin::SupplierQOS& qos);
00092   virtual void
00093       destroy (TAO_EC_Supplier_Filter *filter);
00094 
00095 private:
00096   /// The filter....
00097   TAO_EC_Trivial_Supplier_Filter filter_;
00098 };
00099 
00100 TAO_END_VERSIONED_NAMESPACE_DECL
00101 
00102 #include /**/ "ace/post.h"
00103 
00104 #endif /* TAO_EC_TRIVIAL_SUPPLIER_FILTER_H */

Generated on Tue Feb 2 17:44:06 2010 for TAO_RTEvent by  doxygen 1.4.7