10 #ifndef ICE_INSTRUMENTATION_I_H
11 #define ICE_INSTRUMENTATION_I_H
13 #include <Ice/MetricsObserverI.h>
14 #include <Ice/Connection.h>
28 IceMX::ObserverT<T>::attach();
38 IceMX::ObserverT<T>::detach();
46 failed(
const std::string& exceptionName)
48 IceMX::ObserverT<T>::failed(exceptionName);
67 template<
typename ObserverImpl,
typename ObserverMetricsType,
typename ObserverPtrType>
ObserverPtrType
71 ICE_INTERNAL_HANDLE<ObserverImpl> obsv = IceMX::ObserverT<T>::template getObserver<ObserverImpl>(mapName,
75 obsv->setDelegate(del);
91 IceMX::ObserverFactoryT<
T>(metrics, name)
95 template<
typename ObserverMetricsType,
typename ObserverPtrType> ObserverPtrType
98 ICE_INTERNAL_HANDLE<T> obsv = IceMX::ObserverFactoryT<T>::getObserver(helper);
101 obsv->setDelegate(del);
107 template<
typename ObserverMetricsType,
typename ObserverPtrType> ObserverPtrType
109 const ObserverPtrType& old)
111 ICE_INTERNAL_HANDLE<T> obsv = IceMX::ObserverFactoryT<T>::getObserver(helper, old);
114 obsv->setDelegate(del);
121 template<
typename Helper>
124 attrs.add(
"endpoint", &Helper::getEndpoint);
126 attrs.add(
"endpointType", &Helper::getEndpointInfo, &Ice::EndpointInfo::type);
127 attrs.add(
"endpointIsDatagram", &Helper::getEndpointInfo, &Ice::EndpointInfo::datagram);
128 attrs.add(
"endpointIsSecure", &Helper::getEndpointInfo, &Ice::EndpointInfo::secure);
129 attrs.add(
"endpointTimeout", &Helper::getEndpointInfo, &Ice::EndpointInfo::timeout);
130 attrs.add(
"endpointCompress", &Helper::getEndpointInfo, &Ice::EndpointInfo::compress);
132 attrs.add(
"endpointHost", &Helper::getEndpointInfo, &Ice::IPEndpointInfo::host);
133 attrs.add(
"endpointPort", &Helper::getEndpointInfo, &Ice::IPEndpointInfo::port);
136 template<
typename Helper>
139 attrs.add(
"incoming", &Helper::getConnectionInfo, &Ice::ConnectionInfo::incoming);
140 attrs.add(
"adapterName", &Helper::getConnectionInfo, &Ice::ConnectionInfo::adapterName);
141 attrs.add(
"connectionId", &Helper::getConnectionInfo, &Ice::ConnectionInfo::connectionId);
143 attrs.add(
"localHost", &Helper::getConnectionInfo, &Ice::IPConnectionInfo::localAddress);
144 attrs.add(
"localPort", &Helper::getConnectionInfo, &Ice::IPConnectionInfo::localPort);
145 attrs.add(
"remoteHost", &Helper::getConnectionInfo, &Ice::IPConnectionInfo::remoteAddress);
146 attrs.add(
"remotePort", &Helper::getConnectionInfo, &Ice::IPConnectionInfo::remotePort);
148 attrs.add(
"mcastHost", &Helper::getConnectionInfo, &Ice::UDPConnectionInfo::mcastAddress);
149 attrs.add(
"mcastPort", &Helper::getConnectionInfo, &Ice::UDPConnectionInfo::mcastPort);
151 addEndpointAttributes<Helper>(attrs);
155 Ice::Instrumentation::ConnectionObserver>
167 virtual void stateChanged(Ice::Instrumentation::ThreadState, Ice::Instrumentation::ThreadState);
187 Ice::Instrumentation::CollocatedObserver>
195 Ice::Instrumentation::InvocationObserver>
203 virtual Ice::Instrumentation::RemoteObserverPtr
206 virtual Ice::Instrumentation::CollocatedObserverPtr
220 virtual Ice::Instrumentation::ObserverPtr getConnectionEstablishmentObserver(
const Ice::EndpointPtr&,
223 virtual Ice::Instrumentation::ObserverPtr getEndpointLookupObserver(
const Ice::EndpointPtr&);
225 virtual Ice::Instrumentation::ConnectionObserverPtr
226 getConnectionObserver(
const Ice::ConnectionInfoPtr&,
227 const Ice::EndpointPtr&,
228 Ice::Instrumentation::ConnectionState,
229 const Ice::Instrumentation::ConnectionObserverPtr&);
231 virtual Ice::Instrumentation::ThreadObserverPtr getThreadObserver(
const std::string&,
const std::string&,
232 Ice::Instrumentation::ThreadState,
233 const Ice::Instrumentation::ThreadObserverPtr&);
235 virtual Ice::Instrumentation::InvocationObserverPtr getInvocationObserver(
const Ice::ObjectPrxPtr&,
237 const Ice::Context&);
239 virtual Ice::Instrumentation::DispatchObserverPtr getDispatchObserver(
const Ice::Current&,
Ice::Int);
241 const IceInternal::MetricsAdminIPtr& getFacet()
const;
247 IceInternal::MetricsAdminIPtr _metrics;
248 const Ice::Instrumentation::CommunicatorObserverPtr _delegate;