use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelAsyncResponse in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusByChannelSteps method aGetMBusEncryptionKeyStatusByChannelRequestIsReceived.
@When("^a get M-Bus encryption key status by channel request is received$")
public void aGetMBusEncryptionKeyStatusByChannelRequestIsReceived(final Map<String, String> settings) throws Throwable {
final GetMbusEncryptionKeyStatusByChannelRequest request = GetMbusEncryptionKeyStatusByChannelRequestFactory.fromParameterMap(settings);
final GetMbusEncryptionKeyStatusByChannelAsyncResponse asyncResponse = this.smartMeterConfigurationClient.getMbusEncryptionKeyStatusByChannel(request);
assertThat(asyncResponse).as(OPERATION + ": Async response should not be null").isNotNull();
LOGGER.info(OPERATION + ": Async response is received {}", asyncResponse);
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION, asyncResponse.getDeviceIdentification());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelAsyncResponse 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);
}
Aggregations