
com.evento.common.performance.RemotePerformanceService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of evento-common Show documentation
Show all versions of evento-common Show documentation
Common Library of Object and Algorithms for Evento Framework
The newest version!
package com.evento.common.performance;
import com.evento.common.messaging.bus.EventoServer;
/**
* RemotePerformanceService is a subclass of PerformanceService that provides functionality for sending performance metrics to a remote server.
* It extends and overrides methods from the PerformanceService class to send metrics using an instance of the EventoServer interface.
*/
public class RemotePerformanceService extends PerformanceService {
private final EventoServer eventoServer;
/**
* Constructs a new RemotePerformanceService object with the given EventoServer instance and performance capture rate.
*
* @param eventoServer The EventoServer instance for sending performance metrics.
* @param performanceCaptureRate The rate at which performance metrics are captured.
*/
public RemotePerformanceService(EventoServer eventoServer,
double performanceCaptureRate) {
super(performanceCaptureRate);
this.eventoServer = eventoServer;
}
@Override
public void sendServiceTimeMetricMessage(PerformanceServiceTimeMessage message) throws Exception {
eventoServer.send(message);
}
@Override
public void sendInvocationMetricMessage(PerformanceInvocationsMessage message) throws Exception {
eventoServer.send(message);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy