Interface IDataConnector<T>

Type Parameters:
T - data type
All Known Subinterfaces:
IWriteConnector<T>
All Known Implementing Classes:
EAbstractDataConnector, EDataConnectorD, EDataConnectorDD

public interface IDataConnector<T>

IDataConnector interface.

Author:
igor@scictrl.com
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Push strategy method.
    static enum 
    Update strategy enum
  • Method Summary

    Modifier and Type
    Method
    Description
    A thorough tests of connection and device by all relevant data, including making remote calls.
    void
    Destroys remote connection and release all relevant resources.
    get()
    Gets value from remote data source and returns it.
    getFormat.
    long
    getLatestReceivedTimestamp.
    Returns latest position delivered to the connector by way of event updates.
    getName.
    boolean
    A quick tests of connection and device by examining locally available data.
    boolean
    Tests connection and device if it is in usable state.
  • Method Details

    • get

      T get() throws Exception
      Gets value from remote data source and returns it.
      Returns:
      value from remote data source.
      Throws:
      Exception - if remote get fails
    • destroy

      void destroy()
      Destroys remote connection and release all relevant resources.
    • getLatestReceivedValue

      T getLatestReceivedValue()
      Returns latest position delivered to the connector by way of event updates.
      Returns:
      lates data update value
    • test

      boolean test()
      Tests connection and device if it is in usable state. This may include making remote calls and checking remote status or other values.
      Returns:
      true if connector can be used
    • isReady

      boolean isReady()
      A quick tests of connection and device by examining locally available data. It is suppose to be lightweight method, avoiding making remote calls and should exit quickly.
      Returns:
      true if connector can be used
    • dataType

      Class<T> dataType()
      A thorough tests of connection and device by all relevant data, including making remote calls.
      Returns:
      true if connector can be used
    • getFormat

      String getFormat() throws ControlSystemException

      getFormat.

      Returns:
      a String object
      Throws:
      ControlSystemException - if any.
    • getLatestReceivedTimestamp

      long getLatestReceivedTimestamp()

      getLatestReceivedTimestamp.

      Returns:
      a long
    • getName

      String getName()

      getName.

      Returns:
      a String object