EC_Gateway_IIOP_Factory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   EC_Gateway_IIOP_Factory.h
00005  *
00006  *  EC_Gateway_IIOP_Factory.h,v 1.10 2006/03/15 07:52:22 jtc Exp
00007  *
00008  *  @author Johnny Willemsen  (jwillemsen@remedy.nl)
00009  *
00010  */
00011 
00012 #ifndef TAO_EC_GATEWAY_IIOP_FACTORY_H
00013 #define TAO_EC_GATEWAY_IIOP_FACTORY_H
00014 
00015 #include /**/ "ace/pre.h"
00016 #include "ace/Service_Config.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 #include "ace/Time_Value.h"
00023 #include "ace/Service_Object.h"
00024 #include "ace/SString.h"
00025 
00026 #include /**/ "orbsvcs/Event/event_serv_export.h"
00027 
00028 #include "tao/Versioned_Namespace.h"
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 class TAO_ECG_ConsumerEC_Control;
00033 class TAO_EC_Gateway_IIOP;
00034 
00035 /**
00036  * @class TAO_EC_Gateway_IIOP_Factory
00037  *
00038  * @brief Factory for the EC_Gateway_IIOP settings
00039  *
00040  * Default configuration values can be found in ECG_Defaults.h
00041  */
00042 class TAO_RTEvent_Serv_Export TAO_EC_Gateway_IIOP_Factory
00043   : public ACE_Service_Object
00044 {
00045 public:
00046   TAO_EC_Gateway_IIOP_Factory (void);
00047   virtual ~TAO_EC_Gateway_IIOP_Factory (void);
00048 
00049   /// The Service_Object entry points.
00050   //@{
00051   virtual int init (int argc, char* argv[]);
00052   virtual int fini (void);
00053   //@}
00054 
00055   /// Helper function to register the Gateway into the service
00056   /// configurator.
00057   static int init_svcs (void);
00058 
00059   /// Create the consumer event channel control.
00060   TAO_ECG_ConsumerEC_Control *
00061       create_consumerec_control (TAO_EC_Gateway_IIOP* gateway);
00062 
00063   /// Destroy consumer event channel control.
00064   void destroy_consumerec_control (TAO_ECG_ConsumerEC_Control* x);
00065 
00066   /// Accessors to use_ttl flag
00067   int use_ttl (void) const;
00068 
00069   /// Accessors to use_consumer_proxy_map flag
00070   int use_consumer_proxy_map (void) const;
00071 
00072 private:
00073   /// Helper for agrument parsing.  Prints out an error message about
00074   /// unsupported option value.
00075   void unsupported_option_value (const char * option_name,
00076                                  const char * option_value);
00077 
00078 protected:
00079   /// Use this ORB to locate global resources.
00080   ACE_CString orbid_;
00081 
00082   /// The control policy for the consumer event channel
00083   int consumer_ec_control_;
00084 
00085   /// The consumer event channel control periods in usecs
00086   int consumer_ec_control_period_;
00087 
00088   /// The control timeout in usecs for the consumer event channel
00089   ACE_Time_Value consumer_ec_control_timeout_;
00090 
00091   /// If 1, we use the TTL flags, if 0, we just ignore TTL.
00092   /// @note When this flag is set to 0, make sure that no recursive structures
00093   /// exists in the gateway setup for the same source/type combination, else
00094   /// one event will flow continuosly through all gateways.
00095   int use_ttl_;
00096 
00097   /// The flag for using the consumer proxy map. With 1 the consumer proxy map
00098   /// is used, meaning that for each unique source id we use a different
00099   /// proxy push consumer, if 0, we only use one proxy push consumer for all
00100   /// source ids.
00101   int use_consumer_proxy_map_;
00102 };
00103 
00104 TAO_END_VERSIONED_NAMESPACE_DECL
00105 
00106 ACE_STATIC_SVC_DECLARE (TAO_EC_Gateway_IIOP_Factory)
00107 ACE_FACTORY_DECLARE (TAO_RTEvent_Serv, TAO_EC_Gateway_IIOP_Factory)
00108 
00109 #if defined (__ACE_INLINE__)
00110 #include "orbsvcs/Event/EC_Gateway_IIOP_Factory.i"
00111 #endif /* __ACE_INLINE__ */
00112 
00113 #include /**/ "ace/post.h"
00114 
00115 #endif /* TAO_EC_GATEWAY_IIOP_FACTORY_H */

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