summaryrefslogtreecommitdiff
path: root/modules/TAO/tao/DiffServPolicy/DiffServ_Network_Priority_Hook.h
blob: c27837e29a79110fe706eb47b38a2dd40667f0aa (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
// -*- C++ -*-

//=============================================================================
/**
 *  @file    Diffserv_Network_Priority_Hook.h
 *
 *  $Id$
 *
 *  @author  Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu>
 *           Johnny Willemsen <jwillemsen@remedy.nl>
 */
//=============================================================================

#ifndef TAO_DIFFSERV_NETWORK_PRIORITY_HOOK_H
#define TAO_DIFFSERV_NETWORK_PRIORITY_HOOK_H

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

#include "tao/DiffServPolicy/DiffServPolicy_Export.h"

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

#include "tao/PortableServer/Network_Priority_Hook.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

class TAO_DiffServPolicy_Export TAO_DiffServ_Network_Priority_Hook
  : public TAO_Network_Priority_Hook
{
public:
  virtual ~TAO_DiffServ_Network_Priority_Hook(void);

  /// This function is a hook, that is called from the Root_POA's
  /// constructor. It allows the POA to cache the server side network
  /// priority policy, so that it can be used for sending replies with the
  /// policy-specified DiffServ codepoint.
  ///
  void update_network_priority (TAO_Root_POA &poa, 
                                TAO_POA_Policy_Set &poa_policy_set);

  /// This function is a hook, that is used by the POA's servant dispatcher
  /// when it tries to assign DiffServ codepoints on the replies.
  ///
  void set_dscp_codepoint (TAO_ServerRequest &req,
                           TAO_Root_POA &poa);
};

TAO_END_VERSIONED_NAMESPACE_DECL

ACE_STATIC_SVC_DECLARE_EXPORT (TAO_DiffServPolicy,
                               TAO_DiffServ_Network_Priority_Hook)
ACE_FACTORY_DECLARE (TAO_DiffServPolicy, TAO_DiffServ_Network_Priority_Hook)


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

#endif /* TAO_DIFFSERV_NETWORK_PRIORITY_HOOK_H */