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
Modifier and TypeInterfaceDescriptionstatic enum
Push strategy method.static enum
Update strategy enum -
Method Summary
Modifier and TypeMethodDescriptiondataType()
A thorough tests of connection and device by all relevant data, including making remote calls.void
destroy()
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()
getName.boolean
isReady()
A quick tests of connection and device by examining locally available data.boolean
test()
Tests connection and device if it is in usable state.
-
Method Details
-
get
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
A thorough tests of connection and device by all relevant data, including making remote calls.- Returns:
- true if connector can be used
-
getFormat
getFormat.
- Returns:
- a
String
object - Throws:
ControlSystemException
- if any.
-
getLatestReceivedTimestamp
long getLatestReceivedTimestamp()getLatestReceivedTimestamp.
- Returns:
- a long
-
getName
String getName()getName.
- Returns:
- a
String
object
-