Class LiveDataServiceBuilder
-
- All Implemented Interfaces:
-
de.jnkconsulting.e3dc.easyrscp.service.builder.ServiceBuilder
public final class LiveDataServiceBuilder extends DefaultServiceBuilder<LiveDataService>
ServiceBuilder implementation that creates instances of the LiveDataService type.
The Builder offers optional extension points in frame conversion and frame generation:
- Since:
2.0
-
-
Constructor Summary
Constructors Constructor Description LiveDataServiceBuilder()
-
Method Summary
Modifier and Type Method Description LiveDataServiceBuilderwithConnectionBuilder(ConnectionBuilder connectionBuilder)Function is only overwritten to increase usability in java. final LiveDataServiceBuilderwithPowerStateFrameConverter(FrameConverter<PowerState> converter)Sets the converter to create a PowerState object from a response frame. final LiveDataServiceBuilderwithRequestLiveDataFrameCreator(FrameCreator<Void> creator)Sets the creator of request frames to load the current live data production data from the house power plant database. DefaultLiveDataServicebuildService()Creates a new service instance -
-
Method Detail
-
withConnectionBuilder
LiveDataServiceBuilder withConnectionBuilder(ConnectionBuilder connectionBuilder)
Function is only overwritten to increase usability in java. Without that, the Java compiler would generate an error, because here a DefaultServiceBuilder instance is supplied and no LiveDataServiceBuilder instance ...
- Parameters:
connectionBuilder- Required connection builder
-
withPowerStateFrameConverter
final LiveDataServiceBuilder withPowerStateFrameConverter(FrameConverter<PowerState> converter)
Sets the converter to create a PowerState object from a response frame. Optional setting. By default an instance of the type PowerStateConverter is used.
- Parameters:
converter- Converter to use- Returns:
this reference
- Since:
2.0
-
withRequestLiveDataFrameCreator
final LiveDataServiceBuilder withRequestLiveDataFrameCreator(FrameCreator<Void> creator)
Sets the creator of request frames to load the current live data production data from the house power plant database. Optional setting. By default, an instance of the type RequestLiveDataCreator is used.
- Parameters:
creator- Creator to use- Returns:
this reference
- Since:
2.0
-
buildService
DefaultLiveDataService buildService()
Creates a new service instance
- Returns:
Service instance
- Since:
2.0
-
-
-
-