Class ObserverFactoryWithDelegate<T extends Metrics,OImpl extends ObserverWithDelegate<T,O>,O extends Observer>

java.lang.Object
com.zeroc.IceMX.ObserverFactory<T,OImpl>
com.zeroc.IceMX.ObserverFactoryWithDelegate<T,OImpl,O>
Type Parameters:
T - the metrics type
OImpl - the observer implementation type that supports delegation
O - the delegate observer type

public class ObserverFactoryWithDelegate<T extends Metrics,OImpl extends ObserverWithDelegate<T,O>,O extends Observer> extends ObserverFactory<T,OImpl>
Factory for creating observer instances that support delegation.
  • Constructor Details

    • ObserverFactoryWithDelegate

      public ObserverFactoryWithDelegate(com.zeroc.Ice.MetricsAdminI metrics, String name, Class<T> cl)
      Constructs an ObserverFactoryWithDelegate.
      Parameters:
      metrics - the metrics admin instance
      name - the name of the metrics map
      cl - the metrics class
  • Method Details

    • getObserver

      public O getObserver(MetricsHelper<T> helper, Class<OImpl> cl, O delegate)
      Gets an observer instance with a delegate.
      Parameters:
      helper - the metrics helper
      cl - the observer implementation class
      delegate - the delegate observer
      Returns:
      the observer instance with delegate set, or the delegate if no metrics maps are enabled
    • getObserver

      public O getObserver(MetricsHelper<T> helper, Object observer, Class<OImpl> cl, O delegate)
      Gets an observer instance with a delegate and previous observer.
      Parameters:
      helper - the metrics helper
      observer - the previous observer, or null
      cl - the observer implementation class
      delegate - the delegate observer
      Returns:
      the observer instance with delegate set, or the delegate if no metrics maps are enabled