use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery in project open-smart-grid-platform by OSGP.
the class GetFirmwareRequestMessageProcessor method handleMessage.
@Override
protected void handleMessage(final MessageMetadata deviceMessageMetadata, final Object dataObject) throws FunctionalException {
final GetFirmwareVersionQuery getFirmwareVersionQuery = (GetFirmwareVersionQuery) dataObject;
this.configurationService.requestFirmwareVersion(deviceMessageMetadata, getFirmwareVersionQuery);
}
use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method getFirmwareVersionGas.
@PayloadRoot(localPart = "GetFirmwareVersionGasRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetFirmwareVersionGasAsyncResponse getFirmwareVersionGas(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetFirmwareVersionGasRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_FIRMWARE_VERSION).withMessageType(MessageType.GET_FIRMWARE_VERSION).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, new GetFirmwareVersionQuery(true));
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, GetFirmwareVersionGasAsyncResponse.class);
}
use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetFirmwareVersionQuery in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method getFirmwareVersion.
/**
* Starts the proces of retrieving the firmware version(s) of the device specified in the {@link
* GetFirmwareVersionRequest}
*
* @param organisationIdentification {@link String} containing the identification of the
* organization
* @param request the {@link GetFirmwareVersionRequest}
* @param messagePriority the message priority
* @param scheduleTime the time the message is scheduled
* @return the {@link GetFirmwareVersionAsyncResponse} containing the correlation id
* @throws OsgpException
*/
@PayloadRoot(localPart = "GetFirmwareVersionRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetFirmwareVersionAsyncResponse getFirmwareVersion(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetFirmwareVersionRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_FIRMWARE_VERSION).withMessageType(MessageType.GET_FIRMWARE_VERSION).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, new GetFirmwareVersionQuery());
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, GetFirmwareVersionAsyncResponse.class);
}
Aggregations