public final class TelemetrySender
extends java.lang.Object
DataGatherer instances.
This class is a central access point to telemetry, allowing for it to be turned off or on.| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the telemetry sender.
|
void |
deactivate()
Deactivates the telemetry sender.
|
void |
flush()
Flushes the telemetry sender.
|
static TelemetrySender |
sendToFile(java.util.Collection<DataGatherer> gatherers,
java.nio.file.Path file)
Creates a new telemetry sender instance which sends its data to a file.
|
static TelemetrySender |
sendToServer(java.util.Collection<DataGatherer> gatherers,
java.lang.String hostName,
int port)
Creates a new telemetry sender instance which sends its data to a server.
|
public static TelemetrySender sendToServer(java.util.Collection<DataGatherer> gatherers, java.lang.String hostName, int port)
gatherers - The collection of data gatherers.hostName - The host name of the server to send the data to.port - The port of the server to send the data to.public static TelemetrySender sendToFile(java.util.Collection<DataGatherer> gatherers, java.nio.file.Path file)
gatherers - The collection of data gatherers.file - The file to send the data to.public void activate()
DataGatherer instances associated with this sender are also
activated, and data is periodically sent to the configured file/server.public void deactivate()
DataGatherer instances associated with this sender are also
deactivated.public void flush()
DataGatherer instances is send
to the configured file/server.