Package com.zeroc.Ice.Instrumentation
Interface CommunicatorObserver
public interface CommunicatorObserver
The communicator observer interface used by the Ice run-time 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 run-time through the Ice
communicator initialization data.
-
Method Summary
Modifier and TypeMethodDescriptiongetConnectionEstablishmentObserver
(Endpoint endpt, String connector) This method should return an observer for the given endpoint information and connector.This method should return a connection observer for the given connection.getDispatchObserver
(Current c, int size) This method should return a dispatch observer for the given dispatch.This method should return an observer for the given endpoint information.This method should return an invocation observer for the given invocation.getThreadObserver
(String parent, String id, ThreadState s, ThreadObserver o) This method should return a thread observer for the given thread.void
setObserverUpdater
(ObserverUpdater updater) The Ice run-time calls this method when the communicator is initialized.
-
Method Details
-
getConnectionEstablishmentObserver
This method should return an observer for the given endpoint information and connector. The Ice run-time calls this method for each connection establishment attempt.- Parameters:
endpt
- The endpoint.connector
- The description of the connector. For IP transports, this is typically the IP address to connect to.- Returns:
- The observer to instrument the connection establishment.
-
getEndpointLookupObserver
This method should return an observer for the given endpoint information. The Ice run-time 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.- Parameters:
endpt
- The endpoint.- Returns:
- The observer to instrument the endpoint lookup.
-
getConnectionObserver
ConnectionObserver getConnectionObserver(ConnectionInfo c, Endpoint e, ConnectionState s, ConnectionObserver o) This method should return a connection observer for the given connection. The Ice run-time calls this method for each new connection and for all the Ice communicator connections whenObserverUpdater.updateConnectionObservers()
is called.- Parameters:
c
- The connection information.e
- The connection endpoint.s
- The state of the connection.o
- The old connection observer if one is already set or a null reference otherwise.- Returns:
- The connection observer to instrument the connection.
-
getThreadObserver
This method should return a thread observer for the given thread. The Ice run-time calls this method for each new thread and for all the Ice communicator threads whenObserverUpdater.updateThreadObservers()
is called.- Parameters:
parent
- The parent of the thread.id
- The ID of the thread to observe.s
- The state of the thread.o
- The old thread observer if one is already set or a null reference otherwise.- Returns:
- The thread observer to instrument the thread.
-
getInvocationObserver
This method should return an invocation observer for the given invocation. The Ice run-time calls this method for each new invocation on a proxy.- Parameters:
prx
- The proxy used for the invocation.operation
- The name of the invocation.ctx
- The context specified by the user.- Returns:
- The invocation observer to instrument the invocation.
-
getDispatchObserver
This method should return a dispatch observer for the given dispatch. The Ice run-time calls this method each time it receives an incoming invocation to be dispatched for an Ice object.- Parameters:
c
- The current object as provided to the Ice servant dispatching the invocation.size
- The size of the dispatch.- Returns:
- The dispatch observer to instrument the dispatch.
-
setObserverUpdater
The Ice run-time calls this method when the communicator is initialized. The add-in implementing this interface can use this object to get the Ice run-time to re-obtain observers for observed objects.- Parameters:
updater
- The observer updater object.
-