CEC_ConsumerControl.h

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

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