Class Monitoring


  • public class Monitoring
    extends Inventor
    This class enables to manage metrics listeners that monitor states and performance of the service. A Monitoring object is automatically created by RemoteViz. Use the Service.getMonitoring() method to get this object and (for example) add a listener.

    See $OIVHOME/examples/source/RemoteViz/Monitoring

    • Method Detail

      • getNumListeners

        public int getNumListeners()
        Return the number of listeners.
      • isMetricEnabled

        public boolean isMetricEnabled​(Monitoring.MetricTypes metric)
        Check if a metric is enabled.

        Parameters:
        metric - : metric to check Return true if the metric is enabled, false otherwise
      • removeListener

        public void removeListener​(MetricsListener listener)
        Removes a listener for metrics.

        Parameters:
        listener - : object that listens to the service metrics.
      • enableMetrics

        public void enableMetrics​(java.util.EnumSet<Monitoring.MetricTypes> mask)
        Enable metrics By default, all metrics are disabled.

        Parameters:
        mask - : binary mask of MetricType
      • addListener

        public void addListener​(MetricsListener listener)
        Adds a listener for metrics.

        Parameters:
        listener - : object that listens to the service metrics.