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
83namespace Instrumentation
181 virtual void failed(const ::std::string& exceptionName) = 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;
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;
492namespace Instrumentation
495using ObserverPtr = ::std::shared_ptr<Observer>;
497using ThreadObserverPtr = ::std::shared_ptr<ThreadObserver>;
499using ConnectionObserverPtr = ::std::shared_ptr<ConnectionObserver>;
501using DispatchObserverPtr = ::std::shared_ptr<DispatchObserver>;
503using ChildInvocationObserverPtr = ::std::shared_ptr<ChildInvocationObserver>;
505using RemoteObserverPtr = ::std::shared_ptr<RemoteObserver>;
507using CollocatedObserverPtr = ::std::shared_ptr<CollocatedObserver>;
509using InvocationObserverPtr = ::std::shared_ptr<InvocationObserver>;
511using ObserverUpdaterPtr = ::std::shared_ptr<ObserverUpdater>;
513using CommunicatorObserverPtr = ::std::shared_ptr<CommunicatorObserver>;
526namespace Instrumentation
531ICE_API ::Ice::LocalObject* upCast(Observer*);
533typedef ::IceInternal::Handle< Observer> ObserverPtr;
537ICE_API ::Ice::LocalObject* upCast(ThreadObserver*);
539typedef ::IceInternal::Handle< ThreadObserver> ThreadObserverPtr;
541class ConnectionObserver;
543ICE_API ::Ice::LocalObject* upCast(ConnectionObserver*);
545typedef ::IceInternal::Handle< ConnectionObserver> ConnectionObserverPtr;
547class DispatchObserver;
549ICE_API ::Ice::LocalObject* upCast(DispatchObserver*);
551typedef ::IceInternal::Handle< DispatchObserver> DispatchObserverPtr;
553class ChildInvocationObserver;
555ICE_API ::Ice::LocalObject* upCast(ChildInvocationObserver*);
557typedef ::IceInternal::Handle< ChildInvocationObserver> ChildInvocationObserverPtr;
561ICE_API ::Ice::LocalObject* upCast(RemoteObserver*);
563typedef ::IceInternal::Handle< RemoteObserver> RemoteObserverPtr;
565class CollocatedObserver;
567ICE_API ::Ice::LocalObject* upCast(CollocatedObserver*);
569typedef ::IceInternal::Handle< CollocatedObserver> CollocatedObserverPtr;
571class InvocationObserver;
573ICE_API ::Ice::LocalObject* upCast(InvocationObserver*);
575typedef ::IceInternal::Handle< InvocationObserver> InvocationObserverPtr;
577class ObserverUpdater;
579ICE_API ::Ice::LocalObject* upCast(ObserverUpdater*);
581typedef ::IceInternal::Handle< ObserverUpdater> ObserverUpdaterPtr;
583class CommunicatorObserver;
585ICE_API ::Ice::LocalObject* upCast(CommunicatorObserver*);
587typedef ::IceInternal::Handle< CommunicatorObserver> CommunicatorObserverPtr;
596namespace Instrumentation
664namespace Instrumentation
672class ICE_API Observer :
public virtual ::Ice::LocalObject
676 typedef ObserverPtr PointerType;
680#ifdef ICE_CPP11_COMPILER
681 Observer() =
default;
682 Observer(
const Observer&) =
default;
683 Observer& operator=(
const Observer&) =
default;
690 virtual void attach() = 0;
696 virtual void detach() = 0;
702 virtual void failed(const ::std::string& exceptionName) = 0;
706inline bool operator==(
const Observer& lhs,
const Observer& rhs)
708 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
711inline bool operator<(
const Observer& lhs,
const Observer& rhs)
713 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
723class ICE_API ThreadObserver :
virtual public Observer
727 typedef ThreadObserverPtr PointerType;
729 virtual ~ThreadObserver();
731#ifdef ICE_CPP11_COMPILER
732 ThreadObserver() =
default;
733 ThreadObserver(
const ThreadObserver&) =
default;
734 ThreadObserver& operator=(
const ThreadObserver&) =
default;
742 virtual void stateChanged(ThreadState oldState, ThreadState newState) = 0;
746inline bool operator==(
const ThreadObserver& lhs,
const ThreadObserver& rhs)
748 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
751inline bool operator<(
const ThreadObserver& lhs,
const ThreadObserver& rhs)
753 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
761class ICE_API ConnectionObserver :
virtual public Observer
765 typedef ConnectionObserverPtr PointerType;
767 virtual ~ConnectionObserver();
769#ifdef ICE_CPP11_COMPILER
770 ConnectionObserver() =
default;
771 ConnectionObserver(
const ConnectionObserver&) =
default;
772 ConnectionObserver& operator=(
const ConnectionObserver&) =
default;
785 virtual void receivedBytes(
::Ice::Int num) = 0;
789inline bool operator==(
const ConnectionObserver& lhs,
const ConnectionObserver& rhs)
791 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
794inline bool operator<(
const ConnectionObserver& lhs,
const ConnectionObserver& rhs)
796 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
804class ICE_API DispatchObserver :
virtual public Observer
808 typedef DispatchObserverPtr PointerType;
810 virtual ~DispatchObserver();
812#ifdef ICE_CPP11_COMPILER
813 DispatchObserver() =
default;
814 DispatchObserver(
const DispatchObserver&) =
default;
815 DispatchObserver& operator=(
const DispatchObserver&) =
default;
821 virtual void userException() = 0;
831inline bool operator==(
const DispatchObserver& lhs,
const DispatchObserver& rhs)
833 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
836inline bool operator<(
const DispatchObserver& lhs,
const DispatchObserver& rhs)
838 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
847class ICE_API ChildInvocationObserver :
virtual public Observer
851 typedef ChildInvocationObserverPtr PointerType;
853 virtual ~ChildInvocationObserver();
855#ifdef ICE_CPP11_COMPILER
856 ChildInvocationObserver() =
default;
857 ChildInvocationObserver(
const ChildInvocationObserver&) =
default;
858 ChildInvocationObserver& operator=(
const ChildInvocationObserver&) =
default;
869inline bool operator==(
const ChildInvocationObserver& lhs,
const ChildInvocationObserver& rhs)
871 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
874inline bool operator<(
const ChildInvocationObserver& lhs,
const ChildInvocationObserver& rhs)
876 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
885class ICE_API RemoteObserver :
virtual public ChildInvocationObserver
889 typedef RemoteObserverPtr PointerType;
891 virtual ~RemoteObserver();
893#ifdef ICE_CPP11_COMPILER
894 RemoteObserver() =
default;
895 RemoteObserver(
const RemoteObserver&) =
default;
896 RemoteObserver& operator=(
const RemoteObserver&) =
default;
901inline bool operator==(
const RemoteObserver& lhs,
const RemoteObserver& rhs)
903 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
906inline bool operator<(
const RemoteObserver& lhs,
const RemoteObserver& rhs)
908 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
917class ICE_API CollocatedObserver :
virtual public ChildInvocationObserver
921 typedef CollocatedObserverPtr PointerType;
923 virtual ~CollocatedObserver();
925#ifdef ICE_CPP11_COMPILER
926 CollocatedObserver() =
default;
927 CollocatedObserver(
const CollocatedObserver&) =
default;
928 CollocatedObserver& operator=(
const CollocatedObserver&) =
default;
933inline bool operator==(
const CollocatedObserver& lhs,
const CollocatedObserver& rhs)
935 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
938inline bool operator<(
const CollocatedObserver& lhs,
const CollocatedObserver& rhs)
940 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
951class ICE_API InvocationObserver :
virtual public Observer
955 typedef InvocationObserverPtr PointerType;
957 virtual ~InvocationObserver();
959#ifdef ICE_CPP11_COMPILER
960 InvocationObserver() =
default;
961 InvocationObserver(
const InvocationObserver&) =
default;
962 InvocationObserver& operator=(
const InvocationObserver&) =
default;
968 virtual void retried() = 0;
973 virtual void userException() = 0;
983 virtual RemoteObserverPtr getRemoteObserver(const ::Ice::ConnectionInfoPtr& con, const ::Ice::EndpointPtr& endpt,
::Ice::Int requestId,
::Ice::Int size) = 0;
992 virtual CollocatedObserverPtr getCollocatedObserver(const ::Ice::ObjectAdapterPtr& adapter,
::Ice::Int requestId,
::Ice::Int size) = 0;
996inline bool operator==(
const InvocationObserver& lhs,
const InvocationObserver& rhs)
998 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
1001inline bool operator<(
const InvocationObserver& lhs,
const InvocationObserver& rhs)
1003 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
1021class ICE_API ObserverUpdater :
public virtual ::Ice::LocalObject
1025 typedef ObserverUpdaterPtr PointerType;
1027 virtual ~ObserverUpdater();
1029#ifdef ICE_CPP11_COMPILER
1030 ObserverUpdater() =
default;
1031 ObserverUpdater(
const ObserverUpdater&) =
default;
1032 ObserverUpdater& operator=(
const ObserverUpdater&) =
default;
1044 virtual void updateConnectionObservers() = 0;
1055 virtual void updateThreadObservers() = 0;
1059inline bool operator==(
const ObserverUpdater& lhs,
const ObserverUpdater& rhs)
1061 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
1064inline bool operator<(
const ObserverUpdater& lhs,
const ObserverUpdater& rhs)
1066 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
1079class ICE_API CommunicatorObserver :
public virtual ::Ice::LocalObject
1083 typedef CommunicatorObserverPtr PointerType;
1085 virtual ~CommunicatorObserver();
1087#ifdef ICE_CPP11_COMPILER
1088 CommunicatorObserver() =
default;
1089 CommunicatorObserver(
const CommunicatorObserver&) =
default;
1090 CommunicatorObserver& operator=(
const CommunicatorObserver&) =
default;
1102 virtual ObserverPtr getConnectionEstablishmentObserver(const ::Ice::EndpointPtr& endpt, const ::std::string& connector) = 0;
1114 virtual ObserverPtr getEndpointLookupObserver(const ::Ice::EndpointPtr& endpt) = 0;
1128 virtual ConnectionObserverPtr getConnectionObserver(const ::Ice::ConnectionInfoPtr& c, const ::Ice::EndpointPtr& e, ConnectionState s,
const ConnectionObserverPtr& o) = 0;
1142 virtual ThreadObserverPtr getThreadObserver(const ::std::string& parent, const ::std::string&
id, ThreadState s,
const ThreadObserverPtr& o) = 0;
1153 virtual InvocationObserverPtr getInvocationObserver(const ::Ice::ObjectPrx& prx, const ::std::string& operation, const ::Ice::Context& ctx) = 0;
1165 virtual DispatchObserverPtr getDispatchObserver(const ::Ice::Current& c,
::Ice::Int size) = 0;
1174 virtual void setObserverUpdater(
const ObserverUpdaterPtr& updater) = 0;
1178inline bool operator==(
const CommunicatorObserver& lhs,
const CommunicatorObserver& rhs)
1180 return static_cast<const ::Ice::LocalObject&
>(lhs) ==
static_cast<const ::Ice::LocalObject&
>(rhs);
1183inline bool operator<(
const CommunicatorObserver& lhs,
const CommunicatorObserver& rhs)
1185 return static_cast<const ::Ice::LocalObject&
>(lhs) <
static_cast<const ::Ice::LocalObject&
>(rhs);
#define ICE_API
Definition Config.h:197
#define ICE_MEMBER(API)
Definition Config.h:177
The child invocation observer to instrument remote or collocated invocations.
Definition Instrumentation.h:255
virtual void reply(int size)=0
Reply notification.
virtual ~ChildInvocationObserver()
The collocated observer to instrument invocations that are collocated.
Definition Instrumentation.h:285
virtual ~CollocatedObserver()
The communicator observer interface used by the Ice run-time to obtain and update observers for its o...
Definition Instrumentation.h:387
virtual void setObserverUpdater(const ::std::shared_ptr< ObserverUpdater > &updater)=0
The Ice run-time calls this method when the communicator is initialized.
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
This method should return a connection observer for the given connection.
virtual ::std::shared_ptr<::Ice::Instrumentation::InvocationObserver > getInvocationObserver(const ::std::shared_ptr<::Ice::ObjectPrx > &prx, const ::std::string &operation, const ::Ice::Context &ctx)=0
This method should return an invocation observer for the given invocation.
virtual ~CommunicatorObserver()
virtual ::std::shared_ptr<::Ice::Instrumentation::Observer > getConnectionEstablishmentObserver(const ::std::shared_ptr<::Ice::Endpoint > &endpt, const ::std::string &connector)=0
This method should return an observer for the given endpoint information and connector.
virtual ::std::shared_ptr<::Ice::Instrumentation::Observer > getEndpointLookupObserver(const ::std::shared_ptr<::Ice::Endpoint > &endpt)=0
This method should return an observer for the given endpoint information.
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
This method should return a thread observer for the given thread.
virtual ::std::shared_ptr<::Ice::Instrumentation::DispatchObserver > getDispatchObserver(const ::Ice::Current &c, int size)=0
This method should return a dispatch observer for the given dispatch.
The connection observer interface to instrument Ice connections.
Definition Instrumentation.h:209
virtual ~ConnectionObserver()
virtual void sentBytes(int num)=0
Notification of sent bytes over the connection.
virtual void receivedBytes(int num)=0
Notification of received bytes over the connection.
The dispatch observer to instrument servant dispatch.
Definition Instrumentation.h:232
virtual void userException()=0
Notification of a user exception.
virtual void reply(int size)=0
Reply notification.
virtual ~DispatchObserver()
The invocation observer to instrument invocations on proxies.
Definition Instrumentation.h:299
virtual void retried()=0
Notification of the invocation being retried.
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
Get a remote observer for this invocation.
virtual void userException()=0
Notification of a user exception.
virtual ::std::shared_ptr<::Ice::Instrumentation::CollocatedObserver > getCollocatedObserver(const ::std::shared_ptr<::Ice::ObjectAdapter > &adapter, int requestId, int size)=0
Get a collocated observer for this invocation.
virtual ~InvocationObserver()
The observer updater interface.
Definition Instrumentation.h:349
virtual ~ObserverUpdater()
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:160
virtual void failed(const ::std::string &exceptionName)=0
Notification of a failure.
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:273
virtual ~RemoteObserver()
The thread observer interface to instrument Ice threads.
Definition Instrumentation.h:191
virtual ~ThreadObserver()
virtual void stateChanged(ThreadState oldState, ThreadState newState)=0
Notification of thread state change.
Definition Instrumentation.h:63
ThreadState
The thread state enumeration keeps track of the different possible states of Ice threads.
Definition Instrumentation.h:91
@ ThreadStateInUseForUser
The thread is calling user code (servant implementation, AMI callbacks).
Definition Instrumentation.h:107
@ ThreadStateInUseForOther
The thread is performing other internal activities (DNS lookups, timer callbacks, etc).
Definition Instrumentation.h:112
@ ThreadStateInUseForIO
The thread is in use performing reads or writes for Ice connections.
Definition Instrumentation.h:101
@ ThreadStateIdle
The thread is idle.
Definition Instrumentation.h:95
ConnectionState
The state of an Ice connection.
Definition Instrumentation.h:119
@ ConnectionStateHolding
The connection is holding the reception of new messages.
Definition Instrumentation.h:127
@ ConnectionStateActive
The connection is active and can send and receive messages.
Definition Instrumentation.h:131
@ ConnectionStateClosed
The connection is closed and waits for potential dispatch to be finished before being destroyed and d...
Definition Instrumentation.h:141
@ ConnectionStateValidating
The connection is being validated.
Definition Instrumentation.h:123
@ ConnectionStateClosing
The connection is being gracefully shutdown and waits for the peer to close its end of the connection...
Definition Instrumentation.h:136
Definition BuiltinSequences.h:56
int Int
The mapping for the Slice int type.
Definition Config.h:54
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:184