summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/NotifyExt.idl
blob: 7c94e9bcb269d34854301f88c36c11553cd6249d (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
 * @file NotifyExt.idl
 *
 * @brief Additional interfaces for QoS properties to Notify.
 *
 * $Id$
 *
 * @author Pradeep Gore <pradeep@oomworks.com>
 */

#ifndef _NOTIFY_EXT_IDL_
#define _NOTIFY_EXT_IDL_

#include "CosNotifyChannelAdmin.idl"

#pragma prefix ""

/**
 * @namespace NotifyExt
 *
 * @brief Notify Extensions.
 */
module NotifyExt
{
  // Priority defs. same as RTCORBA
  typedef short Priority;
  const Priority minPriority = 0;
  const Priority maxPriority = 32767;

  enum PriorityModel
  {
    CLIENT_PROPAGATED,
    SERVER_DECLARED
  };

  /*
   * ThreadPool QoS property,
   */
  const string ThreadPool = "ThreadPool";

  // ThreadPoolParams : same as RTCORBA::create_threadpool
  struct ThreadPoolParams
  {
    PriorityModel priority_model;
    Priority server_priority;

    unsigned long stacksize;
    unsigned long static_threads;
    unsigned long dynamic_threads;
    Priority default_priority;
    boolean allow_request_buffering;
    unsigned long max_buffered_requests;
    unsigned long max_request_buffer_size;
  };

  /*
   * ThreadPoolLanes QoS property,
   */
  const string ThreadPoolLanes = "ThreadPoolLanes";

  struct ThreadPoolLane
  {
    PriorityModel priority_model;
    Priority server_priority;

    Priority lane_priority;
    unsigned long static_threads;
    unsigned long dynamic_threads;
  };

  typedef sequence <ThreadPoolLane> ThreadPoolLanes_List;

  struct ThreadPoolLanesParams
    {
      PriorityModel priority_model;
      Priority server_priority;

      unsigned long stacksize;
      ThreadPoolLanes_List lanes;
      boolean allow_borrowing;
      boolean allow_request_buffering;
      unsigned long max_buffered_requests;
      unsigned long max_request_buffer_size;
  };

  /*
   * Extend the EventChannelFactory to have a shutdown method.
   */
  interface EventChannelFactory : CosNotifyChannelAdmin::EventChannelFactory
  {
    void destroy ();
  };

  interface ConsumerAdmin : CosNotifyChannelAdmin::ConsumerAdmin
  {
    // Create a new push-style proxy supplier
    /**
     * @param ctype The event format that the ProxyConsumer should
     *   support
     * @param proxy_id The ID assigned to the new proxy supplier
     * @param initial_qos Configure the initial QoS properties of the
     *   new Proxy.
     * @return The new ProxySupplier
     * @throws AdminLimitExceeded if a limit in this admin is reached,
     *   such as the maximum number of proxies.
     * @throws CosNotification::UnsupportedQoS if the requested QoS
     *   properties cannot be satisfied or are invalid
     */
    CosNotifyChannelAdmin::ProxySupplier obtain_notification_push_supplier_with_qos (in CosNotifyChannelAdmin::ClientType ctype,
                                                                                     out CosNotifyChannelAdmin::ProxyID proxy_id,
                                                                                     in CosNotification::QoSProperties initial_qos)
      raises ( CosNotifyChannelAdmin::AdminLimitExceeded,
               CosNotification::UnsupportedQoS
               );
  };

  interface SupplierAdmin : CosNotifyChannelAdmin::SupplierAdmin
  {
    // Create a new push-style proxy supplier
    /**
     * @param ctype The event format that the ProxyConsumer should
     *   support
     * @param proxy_id The ID assigned to the new proxy supplier
     * @param initial_qos Configure the initial QoS properties of the
     *   new Proxy.
     * @return The new ProxyConsumer
     * @throws AdminLimitExceeded if a limit in this admin is reached,
     *   such as the maximum number of proxies.
     * @throws CosNotification::UnsupportedQoS if the requested QoS
     *   properties cannot be satisfied or are invalid
     */
    CosNotifyChannelAdmin::ProxyConsumer obtain_notification_push_consumer_with_qos (in CosNotifyChannelAdmin::ClientType ctype,
                                                                                     out CosNotifyChannelAdmin::ProxyID proxy_id,
                                                                                     in CosNotification::QoSProperties initial_qos)
      raises ( CosNotifyChannelAdmin::AdminLimitExceeded,
               CosNotification::UnsupportedQoS
               );
  };
};

#endif /* _NOTIFY_EXT_IDL_ */