Class ModbusTcpDataSourceAdapter
java.lang.Object
energy.eddie.aiida.adapters.datasource.DataSourceAdapter<ModbusDataSource>
energy.eddie.aiida.adapters.datasource.modbus.ModbusTcpDataSourceAdapter
- All Implemented Interfaces:
AutoCloseable,org.springframework.boot.actuate.health.HealthContributor,org.springframework.boot.actuate.health.HealthIndicator
-
Field Summary
Fields inherited from class energy.eddie.aiida.adapters.datasource.DataSourceAdapter
dataSource, healthSink, recordSink -
Constructor Summary
ConstructorsConstructorDescriptionModbusTcpDataSourceAdapter(ModbusDataSource dataSource) Creates a newDataSourceAdapterwith the specified data source entity. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes any open connections and frees resources used by this datasource.org.springframework.boot.actuate.health.Healthhealth()reactor.core.publisher.Flux<AiidaRecord> start()Starts this datasource and all records will be published on the returned Flux.Methods inherited from class energy.eddie.aiida.adapters.datasource.DataSourceAdapter
create, dataSource, emitAiidaRecordMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Constructor Details
-
ModbusTcpDataSourceAdapter
public ModbusTcpDataSourceAdapter(ModbusDataSource dataSource) throws IllegalArgumentException, ModbusConnectionException Creates a newDataSourceAdapterwith the specified data source entity.- Parameters:
dataSource- The entity of the data source.- Throws:
IllegalArgumentExceptionModbusConnectionException
-
-
Method Details
-
start
Description copied from class:DataSourceAdapterStarts this datasource and all records will be published on the returned Flux.- Specified by:
startin classDataSourceAdapter<ModbusDataSource>- Returns:
- Flux on which all data from this datasource will be published.
-
close
public void close()Description copied from class:DataSourceAdapterCloses any open connections and frees resources used by this datasource. Also emits a complete signal on the Flux returned byDataSourceAdapter.start().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classDataSourceAdapter<ModbusDataSource>
-
health
public org.springframework.boot.actuate.health.Health health()
-