5 #ifndef ICE_OBSERVERHELPER_H
6 #define ICE_OBSERVERHELPER_H
15 template<
typename T = Ice::Instrumentation::Observer>
class ObserverHelperT
19 #ifdef ICE_CPP11_MAPPING
20 using TPtr = ::std::shared_ptr<T>;
22 typedef IceInternal::Handle<T> TPtr;
44 return _observer.get();
65 #ifdef ICE_CPP11_MAPPING
73 return _observer.get();
76 void adopt(ObserverHelperT& other)
78 _observer = other._observer;
91 void failed(
const std::string& reason)
95 _observer->failed(reason);
104 class ICE_API DispatchObserver :
public ObserverHelperT<Ice::Instrumentation::DispatchObserver>
112 _observer->userException();
120 _observer->reply(size);
125 class ICE_API InvocationObserver :
public ObserverHelperT<Ice::Instrumentation::InvocationObserver>
129 InvocationObserver(
const Ice::ObjectPrxPtr&,
const std::string&,
const Ice::Context&);
130 InvocationObserver(Instance*,
const std::string&);
135 void attach(
const Ice::ObjectPrxPtr&,
const std::string&,
const Ice::Context&);
136 void attach(Instance*,
const std::string&);
142 _observer->retried();
146 ::Ice::Instrumentation::ChildInvocationObserverPtr
147 getRemoteObserver(
const Ice::ConnectionInfoPtr& con,
const Ice::EndpointPtr& endpt,
int requestId,
int size)
151 return _observer->getRemoteObserver(con, endpt, requestId, size);
156 ::Ice::Instrumentation::ChildInvocationObserverPtr
157 getCollocatedObserver(
const Ice::ObjectAdapterPtr& adapter,
int requestId,
int size)
161 return _observer->getCollocatedObserver(adapter, requestId, size);
171 _observer->userException();
177 using ObserverHelperT<Ice::Instrumentation::InvocationObserver>::attach;