Class ChargingServiceBuilder
-
- All Implemented Interfaces:
-
de.jnkconsulting.e3dc.easyrscp.service.builder.ServiceBuilder
public final class ChargingServiceBuilder extends DefaultServiceBuilder<ChargingService>
ServiceBuilder implementation that creates instances of the ChargingService type.
The Builder offers optional extension points in frame conversion and frame generation:
- Since:
2.0
-
-
Constructor Summary
Constructors Constructor Description ChargingServiceBuilder()
-
Method Summary
Modifier and Type Method Description ChargingServiceBuilderwithConnectionBuilder(ConnectionBuilder connectionBuilder)Function is only overwritten to increase usability in java. final ChargingServiceBuilderwithChargingConfigurationFrameConverter(FrameConverter<ChargingConfiguration> converter)Sets the converter to create a ChargingConfiguration object from a response frame. final ChargingServiceBuilderwithWriteChargingLimitsResultFrameConverter(FrameConverter<WriteChargingLimitsResult> converter)Sets the converter to create a WriteChargingLimitsResult object from a response frame. final ChargingServiceBuilderwithRequestChargingConfigurationFrameCreator(FrameCreator<Void> creator)Sets the frame generator to request frames for reading the load configuration from the home power plant. final ChargingServiceBuilderwithSetPowerSettingsFrameCreator(FrameCreator<ChargingLimits> creator)Sets the frame generator to request frames for setting charging limitations to the home power plant. DefaultChargingServicebuildService()Creates a new service instance -
-
Method Detail
-
withConnectionBuilder
ChargingServiceBuilder 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 ChargingServiceBuilder instance ...
- Parameters:
connectionBuilder- Required connection builder
-
withChargingConfigurationFrameConverter
final ChargingServiceBuilder withChargingConfigurationFrameConverter(FrameConverter<ChargingConfiguration> converter)
Sets the converter to create a ChargingConfiguration object from a response frame. Optional setting. By default an instance of the type ChargingConfigurationConverter is used.
- Parameters:
converter- Converter to use- Returns:
this reference
- Since:
2.0
-
withWriteChargingLimitsResultFrameConverter
final ChargingServiceBuilder withWriteChargingLimitsResultFrameConverter(FrameConverter<WriteChargingLimitsResult> converter)
Sets the converter to create a WriteChargingLimitsResult object from a response frame. Optional setting. By default an instance of the type WriteChargingLimitsResultConverter is used.
- Parameters:
converter- Converter to use- Returns:
this reference
- Since:
2.0
-
withRequestChargingConfigurationFrameCreator
final ChargingServiceBuilder withRequestChargingConfigurationFrameCreator(FrameCreator<Void> creator)
Sets the frame generator to request frames for reading the load configuration from the home power plant. Optional setting. By default, an instance of the type RequestChargingConfigurationCreator is used.
- Parameters:
creator- Creator to use- Returns:
this reference
- Since:
2.0
-
withSetPowerSettingsFrameCreator
final ChargingServiceBuilder withSetPowerSettingsFrameCreator(FrameCreator<ChargingLimits> creator)
Sets the frame generator to request frames for setting charging limitations to the home power plant. Optional setting. By default, an instance of the type SetPowerSettingsCreator is used.
- Parameters:
creator- Creator to use- Returns:
this reference
- Since:
2.0
-
buildService
DefaultChargingService buildService()
Creates a new service instance
- Returns:
Service instance
- Since:
2.0
-
-
-
-