00001 // -*- C++ -*- 00002 00003 /** 00004 * @file ECG_Simple_Address_Server.h 00005 * 00006 * ECG_Simple_Address_Server.h,v 1.8 2006/03/14 06:14:25 jtc Exp 00007 * 00008 * @author Marina Spivak (marina@atdesk.com) 00009 * 00010 */ 00011 00012 #ifndef TAO_ECG_SIMPLE_ADDRESS_SERVER_H 00013 #define TAO_ECG_SIMPLE_ADDRESS_SERVER_H 00014 #include /**/ "ace/pre.h" 00015 00016 #include "orbsvcs/RtecUDPAdminS.h" 00017 #include "orbsvcs/Event/EC_Lifetime_Utils_T.h" 00018 #include "ace/INET_Addr.h" 00019 00020 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00021 00022 /** 00023 * @class TAO_ECG_Simple_Address_Server 00024 * 00025 * @brief Basic implementation of RtecUDPAdmin idl interface. 00026 * 00027 * This simple server always returns multicast address it was 00028 * initialized with, regardless of the header. 00029 */ 00030 class TAO_RTEvent_Serv_Export TAO_ECG_Simple_Address_Server : 00031 public virtual POA_RtecUDPAdmin::AddrServer 00032 { 00033 public: 00034 00035 /// Create a new TAO_ECG_Simple_Address_Server object. 00036 /// (Constructor access is restricted to insure that all 00037 /// TAO_ECG_Simple_Address_Server objects are heap-allocated.) 00038 static TAO_EC_Servant_Var<TAO_ECG_Simple_Address_Server> create (void); 00039 00040 /// Destructor 00041 virtual ~TAO_ECG_Simple_Address_Server (void); 00042 00043 int init (const char *arg); 00044 00045 // = The RtecUDPAdmin::AddrServer methods 00046 virtual void get_addr (const RtecEventComm::EventHeader& header, 00047 RtecUDPAdmin::UDP_Addr_out addr 00048 ACE_ENV_ARG_DECL) 00049 ACE_THROW_SPEC ((CORBA::SystemException)); 00050 00051 protected: 00052 00053 /// Constructor (protected). Clients can create new 00054 /// TAO_ECG_Simple_Address_Server objects using the static create() 00055 /// method. 00056 TAO_ECG_Simple_Address_Server (void); 00057 00058 private: 00059 ACE_INET_Addr addr_; 00060 }; 00061 00062 TAO_END_VERSIONED_NAMESPACE_DECL 00063 00064 #if defined(__ACE_INLINE__) 00065 #include "orbsvcs/Event/ECG_Simple_Address_Server.i" 00066 #endif /* __ACE_INLINE__ */ 00067 00068 #include /**/ "ace/post.h" 00069 #endif /* TAO_ECG_SIMPLE_ADDRESS_SERVER_H */