summaryrefslogtreecommitdiff
path: root/TAO/tao/PI_Server/ServerRequestDetails.h
blob: fc34a6a66f52d675490be03779b0a76e533bb438 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
// -*- C++ -*-

//=============================================================================
/**
 *  @file    ServerRequestDetails.h
 *
 *  $Id$
 *
 *   This file declares a class that manages the details
 *   about a registered server request interceptor.  Policies can be
 *   used when interceptors are registered, and the policy values
 *   will be processed and used to modify the values of the
 *   ServerRequestDetails object associated with the registered
 *   server request interceptor.
 *
 *  @author  Tim Bradley <bradley_t@ociweb.com>
 */
//=============================================================================

#ifndef TAO_SERVER_REQUEST_DETAILS_H
#define TAO_SERVER_REQUEST_DETAILS_H

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

#include "tao/orbconf.h"

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

#if TAO_HAS_INTERCEPTORS == 1

#include "tao/PI/ProcessingModePolicyC.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace TAO
{
  /**
   * @class ServerRequestDetails
   *
   * @brief The policy-driven details for a registered server request
   *        interceptor
   *
   * Each time a server request interceptor is registered with an ORB,
   * a ServerRequestDetails object will be created and associated with
   * the registered server request interceptor.  If the interceptor is
   * registered with policies, the policies will be used to adjust the
   * values in the ServerRequestDetails appropriately.
   */
  class ServerRequestDetails
  {
  public:
    ServerRequestDetails (void);

    void apply_policies (const CORBA::PolicyList& policies
                         ACE_ENV_ARG_DECL);

    /// Returns true if the ProcessingMode setting permits the "firing"
    /// of the associated server request interceptor based upon the
    /// remote vs. collocated nature of the current servant request
    /// that is being dispatched.
    bool should_be_processed (bool is_remote_request) const;

  private:

    /// The ProcessingMode setting that can be adjusted via the
    /// PortableInterceptor::ProcessingModePolicy.
    PortableInterceptor::ProcessingMode processing_mode_;
  };
}

TAO_END_VERSIONED_NAMESPACE_DECL

#if defined (__ACE_INLINE__)
#include "tao/PI_Server/ServerRequestDetails.inl"
#endif  /* __ACE_INLINE__ */

#endif  /* TAO_HAS_INTERCEPTORS == 1 */

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

#endif /* TAO_SERVER_REQUEST_DETAILS_H */