Interface CommunicatorObserver
- Namespace
- Ice.Instrumentation
- Assembly
- Ice.dll
The communicator observer interface used by the Ice runtime to obtain and update observers for its observable objects. This interface should be implemented by add-ins that wish to observe Ice objects in order to collect statistics. An instance of this interface can be provided to the Ice runtime through the communicator initialization data.
public interface CommunicatorObserver
Remarks
The Ice runtime calls this interface while updating its internal state and does not guard against exceptions it throws. An implementation of this interface must not throw exceptions: a thrown exception can leave the Ice runtime in an inconsistent state or terminate the process.
Methods
getConnectionEstablishmentObserver(Endpoint, string)
This method should return an observer for the given endpoint information and connector. The Ice runtime calls this method for each connection establishment attempt.
Observer getConnectionEstablishmentObserver(Endpoint endpt, string connector)
Parameters
endptEndpointThe endpoint.
connectorstringThe description of the connector. For IP transports, this is typically the IP address to connect to.
Returns
- Observer
The observer to instrument the connection establishment.
getConnectionObserver(ConnectionInfo, Endpoint, ConnectionState, ConnectionObserver)
This method should return a connection observer for the given connection. The Ice runtime calls this method for each new connection and for all the Ice communicator connections when ObserverUpdater.updateConnectionObservers is called.
ConnectionObserver getConnectionObserver(ConnectionInfo c, Endpoint e, ConnectionState s, ConnectionObserver o)
Parameters
cConnectionInfoThe connection information.
eEndpointThe connection endpoint.
sConnectionStateThe state of the connection.
oConnectionObserverThe old connection observer if one is already set; otherwise, null.
Returns
- ConnectionObserver
The connection observer to instrument the connection.
getDispatchObserver(Current, int)
This method should return a dispatch observer for the given dispatch. The Ice runtime calls this method each time it receives an incoming invocation to be dispatched for an Ice object.
DispatchObserver getDispatchObserver(Current c, int size)
Parameters
cCurrentThe current object as provided to the Ice servant dispatching the invocation.
sizeintThe size of the dispatch.
Returns
- DispatchObserver
The dispatch observer to instrument the dispatch.
getEndpointLookupObserver(Endpoint)
This method should return an observer for the given endpoint information. The Ice runtime calls this method to resolve an endpoint and obtain the list of connectors. For IP endpoints, this typically involves doing a DNS lookup to obtain the IP addresses associated with the DNS name.
Observer getEndpointLookupObserver(Endpoint endpt)
Parameters
endptEndpointThe endpoint.
Returns
- Observer
The observer to instrument the endpoint lookup.
getInvocationObserver(ObjectPrx, string, Dictionary<string, string>)
This method should return an invocation observer for the given invocation. The Ice runtime calls this method for each new invocation on a proxy.
InvocationObserver getInvocationObserver(ObjectPrx prx, string operation, Dictionary<string, string> ctx)
Parameters
prxObjectPrxThe proxy used for the invocation.
operationstringThe name of the operation.
ctxDictionary<string, string>The context specified by the user.
Returns
- InvocationObserver
The invocation observer to instrument the invocation.
getThreadObserver(string, string, ThreadState, ThreadObserver)
This method should return a thread observer for the given thread. The Ice runtime calls this method for each new thread and for all the Ice communicator threads when ObserverUpdater.updateThreadObservers is called.
ThreadObserver getThreadObserver(string parent, string id, ThreadState s, ThreadObserver o)
Parameters
parentstringThe parent of the thread.
idstringThe ID of the thread to observe.
sThreadStateThe state of the thread.
oThreadObserverThe old thread observer if one is already set; otherwise, null.
Returns
- ThreadObserver
The thread observer to instrument the thread.
setObserverUpdater(ObserverUpdater)
The Ice runtime calls this method when the communicator is initialized. The add-in implementing this interface can use this object to get the Ice runtime to re-obtain observers for observed objects.
void setObserverUpdater(ObserverUpdater updater)
Parameters
updaterObserverUpdaterThe observer updater object.