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  * This method should return an observer for the given topic.
139  *
140  * @param svc The service name.
141  *
142  * @param name The topic name.
143  *
144  * @param old The previous observer, only set when updating an
145  * existing observer.
146  *
147  **/
148  TopicObserver getTopicObserver(string svc, string name, TopicObserver old);
149 
150  /**
151  *
152  * This method should return an observer for the given subscriber.
153  *
154  * @param topic The name of the topic subscribed.
155  *
156  * @param subscriber The proxy of the subscriber.
157  *
158  * @param qos The QoS configured for the subscriber.
159  *
160  * @param link The proxy of the linked topic if this subscriber
161  * forwards events to a linked topic.
162  *
163  * @param old The previous observer, only set when updating an
164  * existing observer.
165  *
166  **/
167  SubscriberObserver getSubscriberObserver(string svc, string topic, Object* prx, QoS q, IceStorm::Topic* link,
168  SubscriberState s, SubscriberObserver old);
169 
170  /**
171  *
172  * IceStorm calls this method on initialization. The add-in
173  * implementing this interface can use this object to get IceStorm
174  * to re-obtain observers for topics and subscribers.
175  *
176  * @param updater The observer updater object.
177  *
178  **/
179  void setObserverUpdater(ObserverUpdater updater);
180 }
181 
182 }
183 
184 }
IceStorm
Definition: DBTypes.ice:22
IceStorm::Instrumentation::SubscriberState
SubscriberState
Definition: Instrumentation.h:203
IceStorm::Instrumentation::SubscriberStateOffline
@ SubscriberStateOffline
Offline, retrying.
Definition: Instrumentation.h:206
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:207
IceStorm::Instrumentation::SubscriberStateOnline
@ SubscriberStateOnline
Online waiting to send events.
Definition: Instrumentation.h:205