All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.signalfuse.metrics.connection.HttpDataPointProtobufReceiverFactory Maven / Gradle / Ivy

Go to download

Bare minimum core library needed to sending metrics to SignalFuse from Java clients

There is a newer version: 0.0.19
Show newest version
package com.signalfuse.metrics.connection;

import com.signalfuse.metrics.SignalfuseMetricsException;
import com.signalfuse.metrics.endpoint.DataPointReceiverEndpoint;

public class HttpDataPointProtobufReceiverFactory implements DataPointReceiverFactory {
    public static final int DEFAULT_TIMEOUT_MS = 2000;
    private final DataPointReceiverEndpoint dataPointEndpoint;
    private int timeoutMs = DEFAULT_TIMEOUT_MS;

    public HttpDataPointProtobufReceiverFactory(DataPointReceiverEndpoint dataPointEndpoint) {
        this.dataPointEndpoint = dataPointEndpoint;
    }

    public HttpDataPointProtobufReceiverFactory setTimeoutMs(int timeoutMs) {
        this.timeoutMs = timeoutMs;
        return this;
    }

    @Override
    public DataPointReceiver createDataPointReceiver() throws
            SignalfuseMetricsException {
        return new HttpDataPointProtobufReceiverConnection(dataPointEndpoint, this.timeoutMs);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy