16#ifndef __Ice_Instrumentation_h__
17#define __Ice_Instrumentation_h__
34#ifndef ICE_IGNORE_VERSION
35# if ICE_INT_VERSION / 100 != 307
36# error Ice version mismatch!
38# if ICE_INT_VERSION % 100 >= 50
39# error Beta header file detected
41# if ICE_INT_VERSION % 100 < 11
42# error Ice patch level mismatch!
47# if defined(ICE_STATIC_LIBS)
49# elif defined(ICE_API_EXPORTS)
50# define ICE_API ICE_DECLSPEC_EXPORT
52# define ICE_API ICE_DECLSPEC_IMPORT
56#ifdef ICE_CPP11_MAPPING
159class ICE_CLASS(ICE_API) Observer
169 virtual void attach() = 0;
175 virtual void detach() = 0;
181 virtual void failed(const ::std::string& exceptionName) = 0;
190class ICE_CLASS(ICE_API) ThreadObserver :
public virtual ::Ice::Instrumentation::Observer
201 virtual void stateChanged(ThreadState oldState, ThreadState newState) = 0;
208class ICE_CLASS(ICE_API) ConnectionObserver :
public virtual ::Ice::Instrumentation::Observer
218 virtual void sentBytes(
int num) = 0;
224 virtual void receivedBytes(
int num) = 0;
231class ICE_CLASS(ICE_API) DispatchObserver :
public virtual ::Ice::Instrumentation::Observer
240 virtual void userException() = 0;
246 virtual void reply(
int size) = 0;
254class ICE_CLASS(ICE_API) ChildInvocationObserver :
public virtual ::Ice::Instrumentation::Observer
264 virtual void reply(
int size) = 0;
272class ICE_CLASS(ICE_API) RemoteObserver :
public virtual ::Ice::Instrumentation::ChildInvocationObserver
284class ICE_CLASS(ICE_API) CollocatedObserver :
public virtual ::Ice::Instrumentation::ChildInvocationObserver
298class ICE_CLASS(ICE_API) InvocationObserver :
public virtual ::Ice::Instrumentation::Observer
307 virtual void retried() = 0;
312 virtual void userException() = 0;
322 virtual ::std::shared_ptr<::Ice::Instrumentation::RemoteObserver> getRemoteObserver(const ::std::shared_ptr<::Ice::ConnectionInfo>& con, const ::std::shared_ptr<::Ice::Endpoint>& endpt,
int requestId,
int size) = 0;
331 virtual ::std::shared_ptr<::Ice::Instrumentation::CollocatedObserver> getCollocatedObserver(const ::std::shared_ptr<::Ice::ObjectAdapter>& adapter,
int requestId,
int size) = 0;
348class ICE_CLASS(ICE_API) ObserverUpdater
363 virtual void updateConnectionObservers() = 0;
374 virtual void updateThreadObservers() = 0;
386class ICE_CLASS(ICE_API) CommunicatorObserver
401 virtual ::std::shared_ptr<::Ice::Instrumentation::Observer> getConnectionEstablishmentObserver(const ::std::shared_ptr<::Ice::Endpoint>& endpt, const ::std::string& connector) = 0;
413 virtual ::std::shared_ptr<::Ice::Instrumentation::Observer> getEndpointLookupObserver(const ::std::shared_ptr<::Ice::Endpoint>& endpt) = 0;
427 virtual ::std::shared_ptr<::Ice::Instrumentation::ConnectionObserver> getConnectionObserver(const ::std::shared_ptr<::Ice::ConnectionInfo>& c, const ::std::shared_ptr<::Ice::Endpoint>& e, ConnectionState s, const ::std::shared_ptr<ConnectionObserver>& o) = 0;
441 virtual ::std::shared_ptr<::Ice::Instrumentation::ThreadObserver> getThreadObserver(const ::std::string& parent, const ::std::string&
id, ThreadState s, const ::std::shared_ptr<ThreadObserver>& o) = 0;
452 virtual ::std::shared_ptr<::Ice::Instrumentation::InvocationObserver> getInvocationObserver(const ::std::shared_ptr<::Ice::ObjectPrx>& prx, const ::std::string& operation, const ::Ice::Context& ctx) = 0;
464 virtual ::std::shared_ptr<::Ice::Instrumentation::DispatchObserver> getDispatchObserver(const ::Ice::Current& c,
int size) = 0;
473 virtual void setObserverUpdater(const ::std::shared_ptr<ObserverUpdater>& updater) = 0;
492namespace Instrumentation
596namespace Instrumentation
664namespace Instrumentation
680#ifdef ICE_CPP11_COMPILER
702 virtual void failed(const ::std::string& exceptionName) = 0;
711inline bool operator<(
const Observer& lhs,
const Observer& rhs)
731#ifdef ICE_CPP11_COMPILER
751inline bool operator<(
const ThreadObserver& lhs,
const ThreadObserver& rhs)
769#ifdef ICE_CPP11_COMPILER
794inline bool operator<(
const ConnectionObserver& lhs,
const ConnectionObserver& rhs)
812#ifdef ICE_CPP11_COMPILER
836inline bool operator<(
const DispatchObserver& lhs,
const DispatchObserver& rhs)
855#ifdef ICE_CPP11_COMPILER
874inline bool operator<(
const ChildInvocationObserver& lhs,
const ChildInvocationObserver& rhs)
893#ifdef ICE_CPP11_COMPILER
906inline bool operator<(
const RemoteObserver& lhs,
const RemoteObserver& rhs)
925#ifdef ICE_CPP11_COMPILER
938inline bool operator<(
const CollocatedObserver& lhs,
const CollocatedObserver& rhs)
959#ifdef ICE_CPP11_COMPILER
1001inline bool operator<(
const InvocationObserver& lhs,
const InvocationObserver& rhs)
1029#ifdef ICE_CPP11_COMPILER
1064inline bool operator<(
const ObserverUpdater& lhs,
const ObserverUpdater& rhs)
1087#ifdef ICE_CPP11_COMPILER
1183inline bool operator<(
const CommunicatorObserver& lhs,
const CommunicatorObserver& rhs)
#define ICE_API
Definition Config.h:197
#define ICE_MEMBER(API)
Definition Config.h:177
Shared & operator=(const Shared &)
Definition Shared.h:94
The child invocation observer to instrument remote or collocated invocations.
Definition Instrumentation.h:848
ChildInvocationObserverPtr PointerType
Definition Instrumentation.h:851
virtual void reply(::Ice::Int size)=0
Reply notification.
virtual ~ChildInvocationObserver()
The collocated observer to instrument invocations that are collocated.
Definition Instrumentation.h:918
CollocatedObserverPtr PointerType
Definition Instrumentation.h:921
virtual ~CollocatedObserver()
The communicator observer interface used by the Ice run-time to obtain and update observers for its o...
Definition Instrumentation.h:1080
CommunicatorObserverPtr PointerType
Definition Instrumentation.h:1083
virtual void setObserverUpdater(const ObserverUpdaterPtr &updater)=0
The Ice run-time calls this method when the communicator is initialized.
virtual ~CommunicatorObserver()
virtual InvocationObserverPtr getInvocationObserver(const ::Ice::ObjectPrx &prx, const ::std::string &operation, const ::Ice::Context &ctx)=0
This method should return an invocation observer for the given invocation.
virtual ObserverPtr getConnectionEstablishmentObserver(const ::Ice::EndpointPtr &endpt, const ::std::string &connector)=0
This method should return an observer for the given endpoint information and connector.
virtual DispatchObserverPtr getDispatchObserver(const ::Ice::Current &c, ::Ice::Int size)=0
This method should return a dispatch observer for the given dispatch.
virtual ObserverPtr getEndpointLookupObserver(const ::Ice::EndpointPtr &endpt)=0
This method should return an observer for the given endpoint information.
virtual ThreadObserverPtr getThreadObserver(const ::std::string &parent, const ::std::string &id, ThreadState s, const ThreadObserverPtr &o)=0
This method should return a thread observer for the given thread.
virtual ConnectionObserverPtr getConnectionObserver(const ::Ice::ConnectionInfoPtr &c, const ::Ice::EndpointPtr &e, ConnectionState s, const ConnectionObserverPtr &o)=0
This method should return a connection observer for the given connection.
The connection observer interface to instrument Ice connections.
Definition Instrumentation.h:762
virtual ~ConnectionObserver()
ConnectionObserverPtr PointerType
Definition Instrumentation.h:765
virtual void receivedBytes(::Ice::Int num)=0
Notification of received bytes over the connection.
virtual void sentBytes(::Ice::Int num)=0
Notification of sent bytes over the connection.
The dispatch observer to instrument servant dispatch.
Definition Instrumentation.h:805
virtual void reply(::Ice::Int size)=0
Reply notification.
virtual void userException()=0
Notification of a user exception.
DispatchObserverPtr PointerType
Definition Instrumentation.h:808
virtual ~DispatchObserver()
The invocation observer to instrument invocations on proxies.
Definition Instrumentation.h:952
virtual void retried()=0
Notification of the invocation being retried.
virtual void userException()=0
Notification of a user exception.
virtual RemoteObserverPtr getRemoteObserver(const ::Ice::ConnectionInfoPtr &con, const ::Ice::EndpointPtr &endpt, ::Ice::Int requestId, ::Ice::Int size)=0
Get a remote observer for this invocation.
virtual ~InvocationObserver()
virtual CollocatedObserverPtr getCollocatedObserver(const ::Ice::ObjectAdapterPtr &adapter, ::Ice::Int requestId, ::Ice::Int size)=0
Get a collocated observer for this invocation.
InvocationObserverPtr PointerType
Definition Instrumentation.h:955
The observer updater interface.
Definition Instrumentation.h:1022
virtual ~ObserverUpdater()
ObserverUpdaterPtr PointerType
Definition Instrumentation.h:1025
virtual void updateConnectionObservers()=0
Update connection observers associated with each of the Ice connection from the communicator and its ...
virtual void updateThreadObservers()=0
Update thread observers associated with each of the Ice thread from the communicator and its object a...
The object observer interface used by instrumented objects to notify the observer of their existence.
Definition Instrumentation.h:673
virtual void failed(const ::std::string &exceptionName)=0
Notification of a failure.
ObserverPtr PointerType
Definition Instrumentation.h:676
virtual void attach()=0
This method is called when the instrumented object is created or when the observer is attached to an ...
virtual void detach()=0
This method is called when the instrumented object is destroyed and as a result the observer detached...
The remote observer to instrument invocations that are sent over the wire.
Definition Instrumentation.h:886
virtual ~RemoteObserver()
RemoteObserverPtr PointerType
Definition Instrumentation.h:889
The thread observer interface to instrument Ice threads.
Definition Instrumentation.h:724
virtual ~ThreadObserver()
virtual void stateChanged(ThreadState oldState, ThreadState newState)=0
Notification of thread state change.
ThreadObserverPtr PointerType
Definition Instrumentation.h:727
Base class for local Slice classes and interfaces.
Definition LocalObject.h:25
Definition Instrumentation.h:527
::IceInternal::Handle< InvocationObserver > InvocationObserverPtr
Definition Instrumentation.h:575
::IceInternal::Handle< CommunicatorObserver > CommunicatorObserverPtr
Definition Instrumentation.h:587
ConnectionState
The state of an Ice connection.
Definition Instrumentation.h:632
@ ConnectionStateHolding
The connection is holding the reception of new messages.
Definition Instrumentation.h:640
@ ConnectionStateActive
The connection is active and can send and receive messages.
Definition Instrumentation.h:644
@ ConnectionStateClosing
The connection is being gracefully shutdown and waits for the peer to close its end of the connection...
Definition Instrumentation.h:649
@ ConnectionStateClosed
The connection is closed and waits for potential dispatch to be finished before being destroyed and d...
Definition Instrumentation.h:654
@ ConnectionStateValidating
The connection is being validated.
Definition Instrumentation.h:636
::IceInternal::Handle< ChildInvocationObserver > ChildInvocationObserverPtr
Definition Instrumentation.h:557
::IceInternal::Handle< DispatchObserver > DispatchObserverPtr
Definition Instrumentation.h:551
::IceInternal::Handle< ThreadObserver > ThreadObserverPtr
Definition Instrumentation.h:539
::IceInternal::Handle< RemoteObserver > RemoteObserverPtr
Definition Instrumentation.h:563
::IceInternal::Handle< ConnectionObserver > ConnectionObserverPtr
Definition Instrumentation.h:545
ThreadState
The thread state enumeration keeps track of the different possible states of Ice threads.
Definition Instrumentation.h:604
@ ThreadStateInUseForOther
The thread is performing other internal activities (DNS lookups, timer callbacks, etc).
Definition Instrumentation.h:625
@ ThreadStateIdle
The thread is idle.
Definition Instrumentation.h:608
@ ThreadStateInUseForIO
The thread is in use performing reads or writes for Ice connections.
Definition Instrumentation.h:614
@ ThreadStateInUseForUser
The thread is calling user code (servant implementation, AMI callbacks).
Definition Instrumentation.h:620
::IceInternal::Handle< ObserverUpdater > ObserverUpdaterPtr
Definition Instrumentation.h:581
::IceInternal::Handle< Observer > ObserverPtr
Definition Instrumentation.h:533
::IceInternal::Handle< CollocatedObserver > CollocatedObserverPtr
Definition Instrumentation.h:569
Definition BuiltinSequences.h:113
int Int
The mapping for the Slice int type.
Definition Config.h:54
IceUtil::Shared * upCast(::Ice::AsyncResult *)