EC_Dispatching.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_Dispatching.h
00005  *
00006  *  EC_Dispatching.h,v 1.29 2006/03/15 07:52:21 jtc Exp
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_DISPATCHING_H
00017 #define TAO_EC_DISPATCHING_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "orbsvcs/RtecEventCommC.h"
00022 
00023 #include /**/ "orbsvcs/Event/event_serv_export.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 class TAO_EC_QOS_Info;
00032 class TAO_EC_ProxyPushSupplier;
00033 
00034 /**
00035  * @class TAO_EC_Dispatching
00036  *
00037  * @brief Abstract base class for the dispatching strategies.
00038  *
00039  * The dispatching strategies.
00040  * The EC may be configured with different dispatching strategies,
00041  * for instance, it can use a pool of threads to dispatch the
00042  * events, or a set of queues with threads at different priorities
00043  * for each queue or can simply push the event to the consumer in
00044  * FIFO order.
00045  */
00046 class TAO_RTEvent_Serv_Export TAO_EC_Dispatching
00047 {
00048 public:
00049   /// Destructor...
00050   virtual ~TAO_EC_Dispatching (void);
00051 
00052   /// Initialize all the data structures, activate any internal threads,
00053   /// etc.
00054   virtual void activate (void) = 0;
00055 
00056   /**
00057    * Deactivate any internal threads and cleanup internal data
00058    * structures, it should only return once the threads have finished
00059    * their jobs.
00060    */
00061   virtual void shutdown (void) = 0;
00062 
00063   /**
00064    * The consumer represented by @a proxy should receive @a event.
00065    * It can use the information in @a qos_info to determine the event
00066    * priority (among other things).
00067    */
00068   virtual void push (TAO_EC_ProxyPushSupplier *proxy,
00069                      RtecEventComm::PushConsumer_ptr consumer,
00070                      const RtecEventComm::EventSet &event,
00071                      TAO_EC_QOS_Info &qos_info
00072                      ACE_ENV_ARG_DECL_WITH_DEFAULTS) = 0;
00073   virtual void push_nocopy (TAO_EC_ProxyPushSupplier *proxy,
00074                             RtecEventComm::PushConsumer_ptr consumer,
00075                             RtecEventComm::EventSet &event,
00076                             TAO_EC_QOS_Info &qos_info
00077                             ACE_ENV_ARG_DECL_WITH_DEFAULTS) = 0;
00078 };
00079 
00080 TAO_END_VERSIONED_NAMESPACE_DECL
00081 
00082 #include /**/ "ace/post.h"
00083 
00084 #endif /* TAO_EC_DISPATCHING_H */

Generated on Thu Nov 9 13:11:07 2006 for TAO_RTEvent by doxygen 1.3.6