Class NetdataAdapter

java.lang.Object
eu.binjr.core.data.adapters.BaseDataAdapter<Double>
eu.binjr.core.data.adapters.SerializedDataAdapter<Double>
eu.binjr.core.data.adapters.SimpleCachingDataAdapter<Double>
eu.binjr.core.data.adapters.HttpDataAdapter<Double>
eu.binjr.sources.netdata.adapters.NetdataAdapter
All Implemented Interfaces:
eu.binjr.core.data.adapters.DataAdapter<Double>, AutoCloseable

public class NetdataAdapter extends eu.binjr.core.data.adapters.HttpDataAdapter<Double>
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_NAME, USER_AGENT_STRING
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initialises a new instance of the NetdataAdapter class.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected URI
    craftFetchUri(String path, Instant begin, Instant end)
     
    static eu.binjr.core.data.adapters.DataAdapter<Double>
    fromUrl(String address, ZoneId zoneId)
    Returns a new instance of NetdataAdapter for 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.TimeRange
    getInitialTimeRange(String path, List<eu.binjr.core.data.workspace.TimeSeriesInfo<Double>> seriesInfo)
     
     
     
    boolean
     

    Methods inherited from class eu.binjr.core.data.adapters.HttpDataAdapter

    close, craftRequestUri, craftRequestUri, doHttpGet, doHttpGetJson, getBaseAddress, getParams, httpClientFactory, loadParams, onCacheMiss, ping, setBaseAddress, urlFromString

    Methods inherited from class eu.binjr.core.data.adapters.SimpleCachingDataAdapter

    fetchRawData

    Methods inherited from class eu.binjr.core.data.adapters.SerializedDataAdapter

    fetchData

    Methods inherited from class eu.binjr.core.data.adapters.BaseDataAdapter

    getId, isClosed, onStart, setId, toString, validateParameter, validateParameterNullity

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface eu.binjr.core.data.adapters.DataAdapter

    getAdapterInfo
  • Constructor Details

    • NetdataAdapter

      public NetdataAdapter() throws eu.binjr.core.data.exceptions.CannotInitializeDataAdapterException
      Initialises a new instance of the NetdataAdapter class.
      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 of NetdataAdapter for the provided address and time zone.
      Parameters:
      address - the address of a Netdata server.
      zoneId - the desired time zone.
      Returns:
      a new instance of NetdataAdapter for 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:
      craftFetchUri in class eu.binjr.core.data.adapters.HttpDataAdapter<Double>
      Throws:
      eu.binjr.core.data.exceptions.DataAdapterException
    • isSortingRequired

      public boolean isSortingRequired()
    • getDecoder

      public eu.binjr.core.data.codec.Decoder<Double> getDecoder()
      Specified by:
      getDecoder in class eu.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

      public String getEncoding()
    • getTimeZoneId

      public ZoneId 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

      public String getSourceName()