summaryrefslogtreecommitdiff
path: root/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.h
blob: 818c3847455b72e8086e8c2c226f1b3bfcb940d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// -*- C++ -*-

//=============================================================================
/**
 *  @file    Endpoint_Acceptor_Filter.h
 *
 *  $Id$
 *
 *  Subclass of TAO_Default_Acceptor_Filter that populates mprofile and filters 
 *  mprofile with the endpoint policy in TAO_POA_Manager.
 *
 *  @author  Yan Dai <dai_y@ociweb.com>
 */
//=============================================================================


#ifndef TAO_ENDPOINT_ACCEPTOR_FILTER_H
#define TAO_ENDPOINT_ACCEPTOR_FILTER_H

#include /**/ "ace/pre.h"

#include "tao/EndpointPolicy/EndpointPolicy_Export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/PortableServer/Default_Acceptor_Filter.h"
#include "tao/EndpointPolicy/EndpointPolicyC.h"

class TAO_POA_Manager;


TAO_BEGIN_VERSIONED_NAMESPACE_DECL

//=============================================================================
/**
 * @class TAO_Endpoint_Acceptor_Filter
 *
 * @brief Subclass of default Acceptor_Filter.
 *
 * Endpoint strategy for populating mprofile: only the endpoints match
 * the POAManager endpoint policy are included.
 */
//=============================================================================
class TAO_EndpointPolicy_Export TAO_Endpoint_Acceptor_Filter
  : public TAO_Default_Acceptor_Filter
{
public:
  TAO_Endpoint_Acceptor_Filter (EndpointPolicy::Policy_ptr p);

  /// Populate @a mprofile with endpoints match the POAManager endpoint 
  /// policy.
  int fill_profile (const TAO::ObjectKey &object_key,
                    TAO_MProfile &mprofile,
                    TAO_Acceptor **acceptors_begin,
                    TAO_Acceptor **acceptors_end,
                    CORBA::Short priority = TAO_INVALID_PRIORITY);

private:
  // this is the list of endpoints as obtained from the policy value supplied
  // to the constructor.
  EndpointPolicy::EndpointList_var endpoints_;
};

TAO_END_VERSIONED_NAMESPACE_DECL

#include /**/ "ace/post.h"

#endif /* TAO_ENDPOINT_ACCEPTOR_FILTER_H */