00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Endpoint_Acceptor_Filter.h 00006 * 00007 * $Id: Endpoint_Acceptor_Filter.h 75093 2006-10-26 23:10:58Z ossama $ 00008 * 00009 * Subclass of TAO_Default_Acceptor_Filter that populates mprofile and filters 00010 * mprofile with the endpoint policy in TAO_POA_Manager. 00011 * 00012 * @author Yan Dai <dai_y@ociweb.com> 00013 */ 00014 //============================================================================= 00015 00016 00017 #ifndef TAO_ENDPOINT_ACCEPTOR_FILTER_H 00018 #define TAO_ENDPOINT_ACCEPTOR_FILTER_H 00019 00020 #include /**/ "ace/pre.h" 00021 00022 #include "tao/EndpointPolicy/EndpointPolicy_Export.h" 00023 00024 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 #include "tao/PortableServer/Default_Acceptor_Filter.h" 00029 #include "tao/EndpointPolicy/EndpointPolicyC.h" 00030 00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00032 00033 class TAO_POA_Manager; 00034 00035 //============================================================================= 00036 /** 00037 * @class TAO_Endpoint_Acceptor_Filter 00038 * 00039 * @brief Subclass of default Acceptor_Filter. 00040 * 00041 * Endpoint strategy for populating mprofile: only the endpoints match 00042 * the POAManager endpoint policy are included. 00043 */ 00044 //============================================================================= 00045 class TAO_EndpointPolicy_Export TAO_Endpoint_Acceptor_Filter 00046 : public TAO_Default_Acceptor_Filter 00047 { 00048 public: 00049 TAO_Endpoint_Acceptor_Filter (const EndpointPolicy::EndpointList & eps); 00050 00051 /// Populate @a mprofile with endpoints match the POAManager endpoint 00052 /// policy. 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 = TAO_INVALID_PRIORITY); 00058 00059 private: 00060 // this is the list of endpoints as obtained from the policy value supplied 00061 // to the constructor. 00062 EndpointPolicy::EndpointList endpoints_; 00063 }; 00064 00065 TAO_END_VERSIONED_NAMESPACE_DECL 00066 00067 #include /**/ "ace/post.h" 00068 00069 #endif /* TAO_ENDPOINT_ACCEPTOR_FILTER_H */