Class NetdataAdapter
java.lang.Object
eu.binjr.core.data.adapters.BaseDataAdapter<T>
eu.binjr.core.data.adapters.SerializedDataAdapter<T>
eu.binjr.core.data.adapters.SimpleCachingDataAdapter<T>
eu.binjr.core.data.adapters.HttpDataAdapter<Double>
eu.binjr.sources.netdata.adapters.NetdataAdapter
- All Implemented Interfaces:
eu.binjr.core.data.adapters.DataAdapter<Double>,AutoCloseable
A
DataAdapter implementation capable of consuming data from the
Netdata (https://netdata.cloud) API.-
Field Summary
Fields inherited from class eu.binjr.core.data.adapters.HttpDataAdapter
APPLICATION_JSON, BASE_ADDRESS_PARAM_NAMEFields inherited from class eu.binjr.core.data.adapters.SerializedDataAdapter
closed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected URIcraftFetchUri(String path, Instant begin, Instant end) static eu.binjr.core.data.adapters.DataAdapter<Double>Returns a new instance ofNetdataAdapterfor the provided address and time zone.org.eclipse.fx.ui.controls.tree.FilterableTreeItem<eu.binjr.core.data.adapters.SourceBinding>eu.binjr.core.data.codec.Decoder<Double>eu.binjr.common.javafx.controls.TimeRangegetInitialTimeRange(String path, List<eu.binjr.core.data.workspace.TimeSeriesInfo<Double>> seriesInfo) booleanMethods inherited from class eu.binjr.core.data.adapters.HttpDataAdapter
close, craftRequestUri, craftRequestUri, createSslCustomContext, doHttpGet, doHttpGetJson, getBaseAddress, getParams, httpClientFactory, loadParams, onCacheMiss, ping, setBaseAddress, urlFromStringMethods inherited from class eu.binjr.core.data.adapters.SimpleCachingDataAdapter
fetchRawDataMethods inherited from class eu.binjr.core.data.adapters.SerializedDataAdapter
fetchDataMethods inherited from class eu.binjr.core.data.adapters.BaseDataAdapter
getId, isClosed, onStart, setId, toString, validateParameter, validateParameterNullityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface eu.binjr.core.data.adapters.DataAdapter
getAdapterInfo
-
Constructor Details
-
NetdataAdapter
public NetdataAdapter() throws eu.binjr.core.data.exceptions.CannotInitializeDataAdapterExceptionInitialises a new instance of theNetdataAdapterclass.- Throws:
eu.binjr.core.data.exceptions.CannotInitializeDataAdapterException- if an error occurs while initializing the adapter.
-
-
Method Details
-
fromUrl
public static eu.binjr.core.data.adapters.DataAdapter<Double> fromUrl(String address, ZoneId zoneId) throws eu.binjr.core.data.exceptions.CannotInitializeDataAdapterException Returns a new instance ofNetdataAdapterfor the provided address and time zone.- Parameters:
address- the address of a Netdata server.zoneId- the desired time zone.- Returns:
- a new instance of
NetdataAdapterfor the provided address and time zone. - Throws:
eu.binjr.core.data.exceptions.CannotInitializeDataAdapterException- if an error occurs while initializing the adapter.
-
craftFetchUri
protected URI craftFetchUri(String path, Instant begin, Instant end) throws eu.binjr.core.data.exceptions.DataAdapterException - Specified by:
craftFetchUriin classeu.binjr.core.data.adapters.HttpDataAdapter<Double>- Throws:
eu.binjr.core.data.exceptions.DataAdapterException
-
isSortingRequired
public boolean isSortingRequired() -
getDecoder
- Specified by:
getDecoderin classeu.binjr.core.data.adapters.SerializedDataAdapter<Double>
-
getBindingTree
public org.eclipse.fx.ui.controls.tree.FilterableTreeItem<eu.binjr.core.data.adapters.SourceBinding> getBindingTree() throws eu.binjr.core.data.exceptions.DataAdapterException- Throws:
eu.binjr.core.data.exceptions.DataAdapterException
-
getEncoding
-
getTimeZoneId
-
getInitialTimeRange
public eu.binjr.common.javafx.controls.TimeRange getInitialTimeRange(String path, List<eu.binjr.core.data.workspace.TimeSeriesInfo<Double>> seriesInfo) throws eu.binjr.core.data.exceptions.DataAdapterException - Throws:
eu.binjr.core.data.exceptions.DataAdapterException
-
getSourceName
-