Class Monitoring
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.remoteviz.rendering.Monitoring
-
public class Monitoring extends Inventor
This class enables to manage metrics listeners that monitor states and performance of the service. AMonitoring
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Monitoring.MetricTypes
Types of metrics.-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(MetricsListener listener)
Adds a listener for metrics.void
enableMetrics(java.util.EnumSet<Monitoring.MetricTypes> mask)
Enable metrics By default, all metrics are disabled.int
getNumListeners()
Return the number of listeners.boolean
isMetricEnabled(Monitoring.MetricTypes metric)
Check if a metric is enabled.void
removeListener(MetricsListener listener)
Removes a listener for metrics.-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
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.
-
-