00001 // -*- C++ -*- 00002 00003 /** 00004 * @file EC_Gateway.h 00005 * 00006 * EC_Gateway.h,v 1.31 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_GATEWAY_H 00017 #define TAO_EC_GATEWAY_H 00018 00019 #include /**/ "ace/pre.h" 00020 00021 #include /**/ "orbsvcs/Event/event_serv_export.h" 00022 00023 #include "orbsvcs/RtecEventChannelAdminS.h" 00024 #include "orbsvcs/RtecEventCommS.h" 00025 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 /** 00030 * @class TAO_EC_Gateway 00031 * 00032 * @brief Event Channel Gateway 00033 * 00034 * There are several ways to connect several EC together, for 00035 * instance: 00036 * + A single class can use normal IIOP and connect to one EC as 00037 * a supplier and to another EC as a consumer. 00038 * + A class connects as a consumer and transmit the events using 00039 * multicast, another class receives the multicast messages and 00040 * transform them back into a push() call. 00041 * This is an abstract class to represent all the different 00042 * strategies for EC distribution. 00043 * 00044 */ 00045 class TAO_RTEvent_Serv_Export TAO_EC_Gateway 00046 : public POA_RtecEventChannelAdmin::Observer 00047 { 00048 public: 00049 /// Default constructor. 00050 TAO_EC_Gateway (void); 00051 00052 /// Destructor 00053 virtual ~TAO_EC_Gateway (void); 00054 00055 /// The gateway must disconnect from all the relevant event channels, 00056 /// or any other communication media (such as multicast groups). 00057 virtual void close (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) = 0; 00058 00059 /// Obtain and modify the observer handle. 00060 void observer_handle (RtecEventChannelAdmin::Observer_Handle h); 00061 RtecEventChannelAdmin::Observer_Handle observer_handle (void) const; 00062 00063 private: 00064 RtecEventChannelAdmin::Observer_Handle handle_; 00065 }; 00066 00067 TAO_END_VERSIONED_NAMESPACE_DECL 00068 00069 #include /**/ "ace/post.h" 00070 00071 #endif /* ACE_EC_GATEWAY_H */