5#ifndef ICE_OBSERVERHELPER_H
6#define ICE_OBSERVERHELPER_H
15template<
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);
104class ICE_API DispatchObserver :
public ObserverHelperT<Ice::Instrumentation::DispatchObserver>
112 _observer->userException();
120 _observer->reply(size);
125class ICE_API InvocationObserver :
public ObserverHelperT<Ice::Instrumentation::InvocationObserver>
130 InvocationObserver(Instance*,
const std::string&);
136 void attach(Instance*,
const std::string&);
142 _observer->retried();
151 return _observer->getRemoteObserver(con, endpt, requestId, size);
161 return _observer->getCollocatedObserver(adapter, requestId, size);
171 _observer->userException();
177 using ObserverHelperT<Ice::Instrumentation::InvocationObserver>::attach;
#define ICE_API
Definition Config.h:197
#define ICE_NULLPTR
Definition Config.h:380
::IceInternal::Handle< ChildInvocationObserver > ChildInvocationObserverPtr
Definition Instrumentation.h:557
int Int
The mapping for the Slice int type.
Definition Config.h:54
::std::map< ::std::string, ::std::string > Context
A request context.
Definition Current.h:207
::IceInternal::Handle< Endpoint > EndpointPtr
Definition Endpoint.h:468
::IceInternal::Handle< ObjectAdapter > ObjectAdapterPtr
Definition ObjectAdapter.h:620
ObjectPrx ObjectPrxPtr
Definition ProxyF.h:48
::IceInternal::Handle< ConnectionInfo > ConnectionInfoPtr
Definition Connection.h:761