summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/QoSProperties.h
blob: a4bbde9d2750f0d4b76f19bad7f9d49bd5bec57f (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* -*- C++ -*- */
/**
 *  @file QoSProperties.h
 *
 *  $Id$
 *
 *  @author Pradeep Gore <pradeep@oomworks.com>
 *
 *
 */

#ifndef TAO_Notify_QOSPROPERTIES_H
#define TAO_Notify_QOSPROPERTIES_H

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

#include "notify_export.h"

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

#include "PropertySeq.h"
#include "Property_T.h"
#include "Property_Boolean.h"
#include "Property.h"

/**
 * @class TAO_Notify_QoSProperties
 *
 * @brief
 *
 */
class TAO_Notify_Export TAO_Notify_QoSProperties : public TAO_Notify_PropertySeq
{
public:
  /// Constuctor
  TAO_Notify_QoSProperties (void);

  /// Destructor
  ~TAO_Notify_QoSProperties ();

  /// Return 0 on success, 1 if unsupported properties were detected and -1 on error.
  int init (const CosNotification::PropertySeq& prop_seq, CosNotification::PropertyErrorSeq& err_seq);

  /// Populate <qos_properties> with all properties from this object. Returns -1 on error.
  int copy (TAO_Notify_QoSProperties& qos_properties);

  /// Populate <qos_properties> with properties that can be transfered.Returns -1 on error.
  int transfer (TAO_Notify_QoSProperties& qos_properties);

  ///= Accessors
  /// ThreadPool
  const TAO_Notify_Property_ThreadPool& thread_pool (void) const;

  /// ThreadPoolLane
  const TAO_Notify_Property_ThreadPoolLanes& thread_pool_lane (void) const;

  /// Maximum Batch Size
  const TAO_Notify_Property_Long& maximum_batch_size (void) const;

  /// Pacing Interval
  const TAO_Notify_Property_Time& pacing_interval (void) const;

protected:
  /// Return 1 if <value> is unsupported.
  int unsupported (ACE_CString& name);

  enum {UNSUPPORTED_PROPERTY_COUNT = 3};

  ///= Unsupported Properties.
  ACE_CString unsupported_[UNSUPPORTED_PROPERTY_COUNT];

  ///= Supported properties

  /// Priority
  TAO_Notify_Property_Short priority_;

  /// Timeout
  TAO_Notify_Property_Time timeout_;

  /// Stop Time Supported
  TAO_Notify_Property_Boolean stop_time_supported_;

  /// Maximum Batch Size
  TAO_Notify_Property_Long maximum_batch_size_;

  /// Pacing Interval
  TAO_Notify_Property_Time pacing_interval_;

  /// ThreadPool Params.
  TAO_Notify_Property_ThreadPool thread_pool_;

  /// ThreadPoolLane Params.
  TAO_Notify_Property_ThreadPoolLanes thread_pool_lane_;
};

#if defined (__ACE_INLINE__)
#include "QoSProperties.inl"
#endif /* __ACE_INLINE__ */

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

#endif /* TAO_Notify_QOSPROPERTIES_H */