Class MetricsListener
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.remoteviz.rendering.MetricsListener
-
public class MetricsListener extends Inventor
This class can be overridden by an application to monitor the service. These listeners allow to report states and performances metrics of the service. The metrics/listeners can be enabled usingMonitoring.enableMetrics
. The overridden class will be passed as argument to the methodMonitoring.addListener
.The metrics are triggered in the service thread, so costly operations in the listeners could impact global performances of the service.
This class is an abstract class which must be overridden.
See $OIVHOME/examples/source/RemoteViz/Monitoring
- See Also:
Monitoring
-
-
Nested Class Summary
-
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
-
-
Constructor Summary
Constructors Constructor Description MetricsListener()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onChangedNumClients(int number)
Triggered when the number of clients changes.void
onChangedNumConnections(int number)
Triggered when the number of connections changes.void
onChangedNumRenderAreas(int number)
Triggered when the number of renderArea changes.void
onMeasuredDecodingTime(int time, Connection connection)
Triggered when a new measure of frame decoding time is available.void
onMeasuredEncodingTime(int time, Connection connection)
Triggered when a new measure of frame encoding time is available.void
onMeasuredNetworkLatency(int time, Client client)
Triggered when a new measure of network latency is available.void
onMeasuredRenderingTime(int time, RenderArea renderArea)
Triggered when a new measure of frame rendering time is available.-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
onMeasuredNetworkLatency
public void onMeasuredNetworkLatency(int time, Client client)
Triggered when a new measure of network latency is available. The metric must be enabled usingMonitoring.enableMetrics
with the valueMonitoring.NETWORK_LATENCY
.- Parameters:
time
- : network latency in millisecondsclient
- : The network latency is related to this client.
-
onChangedNumClients
public void onChangedNumClients(int number)
Triggered when the number of clients changes. The metric must be enabled usingMonitoring.enableMetrics
with the valueMonitoring.NUM_CLIENTS
.- Parameters:
number
- : number of clients
-
onMeasuredRenderingTime
public void onMeasuredRenderingTime(int time, RenderArea renderArea)
Triggered when a new measure of frame rendering time is available. The metric must be enabled usingMonitoring.enableMetrics
with the valueMonitoring.RENDERING_TIME
.- Parameters:
time
- : frame rendering time in millisecondsrenderArea
- : The frame rendering time is related to this render area.
-
onChangedNumConnections
public void onChangedNumConnections(int number)
Triggered when the number of connections changes. The metric must be enabled usingMonitoring.enableMetrics
with the valueMonitoring.NUM_CONNECTIONS
.- Parameters:
number
- : number of connections
-
onMeasuredEncodingTime
public void onMeasuredEncodingTime(int time, Connection connection)
Triggered when a new measure of frame encoding time is available. The metric must be enabled usingMonitoring.enableMetrics
with the valueMonitoring.ENCODING_TIME
.- Parameters:
time
- : frame encoding time in millisecondsconnection
- : The frame encoding time is related to this connection.
-
onMeasuredDecodingTime
public void onMeasuredDecodingTime(int time, Connection connection)
Triggered when a new measure of frame decoding time is available. The metric must be enabled usingMonitoring.enableMetrics
with the valueMonitoring.DECODING_TIME
.- Parameters:
time
- : frame decoding time in millisecondsconnection
- : The frame decoding time is related to this connection.
-
onChangedNumRenderAreas
public void onChangedNumRenderAreas(int number)
Triggered when the number of renderArea changes. The metric must be enabled usingMonitoring.enableMetrics
with the valueMonitoring.NUM_RENDERAREAS
.- Parameters:
number
- : number of render areas
-
-