00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file RT_Acceptor_Filters.h 00006 * 00007 * $Id: RT_Acceptor_Filters.h 71473 2006-03-10 07:19:20Z jtc $ 00008 * 00009 * RTCORBA strategies for populating mprofile. 00010 * 00011 * @author Marina Spivak <marina@cs.wustl.edu> 00012 */ 00013 // =================================================================== 00014 00015 #ifndef TAO_RT_ACCEPTOR_FILTER_H 00016 #define TAO_RT_ACCEPTOR_FILTER_H 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include "tao/orbconf.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 00027 00028 #include "tao/RTPortableServer/rtportableserver_export.h" 00029 #include "tao/Acceptor_Filter.h" 00030 00031 #define TAO_RTCORBA_SAFE_INCLUDE 00032 #include "tao/RTCORBA/RTCORBAC.h" 00033 #undef TAO_RTCORBA_SAFE_INCLUDE 00034 00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00036 00037 class TAO_Acceptor; 00038 00039 /** 00040 * @class TAO_Server_Protocol_Acceptor_Filter 00041 * 00042 * @brief Populates mprofile with endpoints selected based on the 00043 * RTCORBA::ServerProtocolPolicy. 00044 */ 00045 class TAO_RTPortableServer_Export TAO_Server_Protocol_Acceptor_Filter : 00046 public TAO_Acceptor_Filter 00047 { 00048 public: 00049 /// Constructor 00050 TAO_Server_Protocol_Acceptor_Filter (RTCORBA::ProtocolList &protocols); 00051 00052 /// Populate @a mprofile based on what's in <protocols_>. 00053 int fill_profile (const TAO::ObjectKey &object_key, 00054 TAO_MProfile &mprofile, 00055 TAO_Acceptor **acceptors_begin, 00056 TAO_Acceptor **acceptors_end, 00057 CORBA::Short priority); 00058 00059 /// Encodes the endpoints in the profiles into the TAO_TAG_ENDPOINTS 00060 /// tag component of profiles. 00061 int encode_endpoints (TAO_MProfile &mprofile); 00062 00063 private: 00064 /// Value of the ServerProtocolPolicy used for endpoint 00065 /// selection. 00066 RTCORBA::ProtocolList &protocols_; 00067 }; 00068 00069 TAO_END_VERSIONED_NAMESPACE_DECL 00070 00071 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */ 00072 00073 #include /**/ "ace/post.h" 00074 00075 #endif /* TAO_RT_ACCEPTOR_FILTER_H */