Interface CommunicatorObserver


public interface CommunicatorObserver
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 Ice communicator initialization data.
  • Method Details

    • getConnectionEstablishmentObserver

      Observer getConnectionEstablishmentObserver(Endpoint endpoint, String connector)
      Gets an observer for the given endpoint information and connector. The Ice runtime calls this method for each connection establishment attempt.
      Parameters:
      endpoint - 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

      Observer getEndpointLookupObserver(Endpoint endpoint)
      Gets 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.
      Parameters:
      endpoint - The endpoint.
      Returns:
      The observer to instrument the endpoint lookup.
    • getConnectionObserver

      Gets an 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.
      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

      ThreadObserver getThreadObserver(String parent, String id, ThreadState s, ThreadObserver o)
      Gets 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.
      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

      InvocationObserver getInvocationObserver(ObjectPrx prx, String operation, Map<String,String> ctx)
      Gets an invocation observer for the given invocation. The Ice runtime calls this method for each new invocation on a proxy.
      Parameters:
      prx - The proxy used for the invocation.
      operation - The name of the operation.
      ctx - The context specified by the user.
      Returns:
      The invocation observer to instrument the invocation.
    • getDispatchObserver

      DispatchObserver getDispatchObserver(Current c, int size)
      Gets 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.
      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

      void setObserverUpdater(ObserverUpdater updater)
      Sets the observer updater. 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.
      Parameters:
      updater - The observer updater object.