CEC_SupplierControl.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   CEC_SupplierControl.h
00006  *
00007  *  $Id: CEC_SupplierControl.h 76589 2007-01-25 18:04:11Z elliott_c $
00008  *
00009  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00010  *
00011  * More details can be found in:
00012  *
00013  * http://doc.ece.uci.edu/~coryan/EC/
00014  */
00015 //=============================================================================
00016 
00017 
00018 #ifndef TAO_CEC_SUPPLIERCONTROL_H
00019 #define TAO_CEC_SUPPLIERCONTROL_H
00020 
00021 #include /**/ "ace/pre.h"
00022 
00023 #include "orbsvcs/CosEvent/event_serv_export.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 #include "tao/PortableServer/PortableServer.h"
00030 #include "tao/Basic_Types.h"
00031 
00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00033 
00034 class TAO_CEC_EventChannel;
00035 class TAO_CEC_ProxyPushConsumer;
00036 class TAO_CEC_ProxyPullConsumer;
00037 
00038 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00039 class TAO_CEC_TypedProxyPushConsumer;
00040 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00041 
00042 namespace CORBA
00043 {
00044   class SystemException;
00045 }
00046 
00047 /**
00048  * @class TAO_CEC_SupplierControl
00049  *
00050  * @brief SupplierControl
00051  *
00052  * Defines the interface for the supplier control strategy.
00053  * This strategy handles misbehaving or failing suppliers.
00054  * = MEMORY MANAGMENT
00055  * = LOCKING
00056  * = TODO
00057  */
00058 class TAO_Event_Serv_Export TAO_CEC_SupplierControl
00059 {
00060 public:
00061   /// Constructor.  It does not assume ownership of the <event_channel>
00062   /// parameter.
00063   TAO_CEC_SupplierControl (void);
00064 
00065   /// destructor...
00066   virtual ~TAO_CEC_SupplierControl (void);
00067 
00068   /// Activate any internal threads or timers used to poll the state of
00069   /// the suppliers
00070   virtual int activate (void);
00071   virtual int shutdown (void);
00072 
00073   /**
00074    * Invoked by helper classes when they detect that a supplier does
00075    * not exists (i.e. _non_existent() returns true and/or the
00076    * CORBA::OBJECT_NOT_EXIST exception has been raised).
00077    */
00078   virtual void supplier_not_exist (TAO_CEC_ProxyPushConsumer *proxy);
00079 
00080 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00081   virtual void supplier_not_exist (TAO_CEC_TypedProxyPushConsumer *proxy);
00082 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00083 
00084   /**
00085    * Invoked by helper classes when they detect that a supplier does
00086    * not exists (i.e. _non_existent() returns true and/or the
00087    * CORBA::OBJECT_NOT_EXIST exception has been raised).
00088    */
00089   virtual void supplier_not_exist (TAO_CEC_ProxyPullConsumer *proxy);
00090 
00091   /// Some system exception was rasied while trying to push an event.
00092   virtual void system_exception (TAO_CEC_ProxyPullConsumer *proxy,
00093                                  CORBA::SystemException &);
00094 
00095   /// Do we need to disconnect this supplier?  The parameter type for
00096   /// proxy is PortableServer::ServantBase* due to the fact that this
00097   /// method will be used for TAO_CEC_ProxyPushSupplier's and
00098   /// TAO_CEC_ProxyPullSupplier's.
00099   virtual bool need_to_disconnect (PortableServer::ServantBase* proxy);
00100 
00101   /// Allow others to inform us when a send or receive was successful.
00102   virtual void successful_transmission (PortableServer::ServantBase* proxy);
00103 };
00104 
00105 TAO_END_VERSIONED_NAMESPACE_DECL
00106 
00107 #include /**/ "ace/post.h"
00108 #endif /* TAO_CEC_SUPPLIERCONTROL_H */

Generated on Tue Feb 2 17:44:51 2010 for TAO_CosEvent by  doxygen 1.4.7