Instrumentation.ice
Go to the documentation of this file.
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
9 
10 #pragma once
11 
12 [[ "ice-prefix", "cpp:header-ext:h" ]]
13 
14 #include <Ice/Instrumentation.ice>
15 #include <IceStorm/IceStorm.ice>
16 
17  module IceStorm
18 {
19 
20  module Instrumentation
21  {
22 
23  local interface TopicObserver extends Ice::Instrumentation::Observer
24  {
25  /**
26  *
27  * Notification of an event published on the topic by a publisher.
28  *
29  **/
30  void published();
31 
32  /**
33  *
34  * Notification of an event forwared on the topic by another topic.
35  *
36  **/
37  void forwarded();
38  }
39 
40  local interface SubscriberObserver extends Ice::Instrumentation::Observer
41  {
42  /**
43  *
44  * Notification of some events being queued.
45  *
46  **/
47  void queued(int count);
48 
49  /**
50  *
51  * Notification of a some events being sent.
52  *
53  **/
54  void outstanding(int count);
55 
56  /**
57  *
58  * Notification of some events being delivered.
59  *
60  **/
61  void delivered(int count);
62  }
63 
64  /**
65  *
66  * The ObserverUpdater interface is implemented by IceStorm and an
67  * instance of this interface is provided on initialization to the
68  * TopicManagerObserver object.
69  *
70  * This interface can be used by add-ins imlementing the
71  * TopicManagerObserver interface to update the obsevers of observed
72  * objects.
73  *
74  **/
75  local interface ObserverUpdater
76  {
77  /**
78  *
79  * Update topic observers associated with each topics.
80  *
81  * When called, this method goes through all the topics and for
82  * each topic TopicManagerObserver::getTopicObserver is
83  * called. The implementation of getTopicObserver has the
84  * possibility to return an updated observer if necessary.
85  *
86  **/
87  void updateTopicObservers();
88 
89  /**
90  *
91  * Update subscriber observers associated with each subscriber.
92  *
93  * When called, this method goes through all the subscribers and
94  * for each subscriber TopicManagerObserver::getSubscriberObserver
95  * is called. The implementation of getSubscriberObserver has the
96  * possibility to return an updated observer if necessary.
97  *
98  **/
99  void updateSubscriberObservers();
100  }
101 
103  {
104  /**
105  *
106  * Online waiting to send events.
107  *
108  **/
110 
111  /**
112  *
113  * Offline, retrying.
114  *
115  **/
117 
118  /**
119  *
120  * Error state, awaiting to be destroyed.
121  *
122  **/
124  }
125 
126  /**
127  *
128  * The topic manager observer interface used by the Ice run-time to
129  * obtain and update observers for its observeable objects. This
130  * interface should be implemented by add-ins that wish to observe
131  * IceStorm objects in order to collect statistics.
132  *
133  **/
134  local interface TopicManagerObserver
135 
136  {
137  /**
138  *
139  * This method should return an observer for the given topic.
140  *
141  * @param svc The service name.
142  *
143  * @param name The topic name.
144  *
145  * @param old The previous observer, only set when updating an
146  * existing observer.
147  *
148  **/
149  TopicObserver getTopicObserver(string svc, string name, TopicObserver old);
150 
151  /**
152  *
153  * This method should return an observer for the given subscriber.
154  *
155  * @param topic The name of the topic subscribed.
156  *
157  * @param subscriber The proxy of the subscriber.
158  *
159  * @param qos The QoS configured for the subscriber.
160  *
161  * @param link The proxy of the linked topic if this subscriber
162  * forwards events to a linked topic.
163  *
164  * @param old The previous observer, only set when updating an
165  * existing observer.
166  *
167  **/
168  SubscriberObserver getSubscriberObserver(string svc,
169  string topic,
170  Object * prx,
171  QoS q,
172  IceStorm::Topic * link,
174  SubscriberObserver old);
175 
176  /**
177  *
178  * IceStorm calls this method on initialization. The add-in
179  * implementing this interface can use this object to get IceStorm
180  * to re-obtain observers for topics and subscribers.
181  *
182  * @param updater The observer updater object.
183  *
184  **/
185  void setObserverUpdater(ObserverUpdater updater);
186  }
187  }
188 }
IceStorm
Definition: DBTypes.ice:22
IceStorm::Instrumentation::SubscriberState
SubscriberState
Definition: Instrumentation.h:204
IceStorm::Instrumentation::SubscriberStateOffline
@ SubscriberStateOffline
Offline, retrying.
Definition: Instrumentation.h:207
q
#define q
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
IceStorm::Instrumentation::SubscriberStateError
@ SubscriberStateError
Error state, awaiting to be destroyed.
Definition: Instrumentation.h:208
IceStorm::Instrumentation::SubscriberStateOnline
@ SubscriberStateOnline
Online waiting to send events.
Definition: Instrumentation.h:206