use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusByChannelRequestData in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method getMbusEncryptionKeyStatusByChannel.
@PayloadRoot(localPart = "GetMbusEncryptionKeyStatusByChannelRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetMbusEncryptionKeyStatusByChannelAsyncResponse getMbusEncryptionKeyStatusByChannel(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetMbusEncryptionKeyStatusByChannelRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final GetMbusEncryptionKeyStatusByChannelRequestData requestData = this.configurationMapper.map(request.getGetMbusEncryptionKeyStatusByChannelRequestData(), GetMbusEncryptionKeyStatusByChannelRequestData.class);
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getGatewayDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_MBUS_ENCRYPTION_KEY_STATUS_BY_CHANNEL).withMessageType(MessageType.GET_MBUS_ENCRYPTION_KEY_STATUS_BY_CHANNEL).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, requestData);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, GetMbusEncryptionKeyStatusByChannelAsyncResponse.class);
}
use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.GetMbusEncryptionKeyStatusByChannelRequestData in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusByChannelRequestMessageProcessor method handleMessage.
@Override
protected void handleMessage(final MessageMetadata deviceMessageMetadata, final Object dataObject) throws FunctionalException {
final GetMbusEncryptionKeyStatusByChannelRequestData getMbusEncryptionKeyStatusByChannelRequest = (GetMbusEncryptionKeyStatusByChannelRequestData) dataObject;
this.configurationService.getMbusEncryptionKeyStatusByChannel(deviceMessageMetadata, getMbusEncryptionKeyStatusByChannelRequest);
}
Aggregations