use of org.opensmartgridplatform.dto.valueobjects.smartmetering.ScanMbusChannelsResponseDto in project open-smart-grid-platform by OSGP.
the class ScanMbusChannelsResponseMessageProcessor method handleMessage.
@Override
protected void handleMessage(final MessageMetadata deviceMessageMetadata, final ResponseMessage responseMessage, final OsgpException osgpException) throws FunctionalException {
if (responseMessage.getDataObject() instanceof ScanMbusChannelsResponseDto) {
final ScanMbusChannelsResponseDto scanMbusChannelsResponseDto = (ScanMbusChannelsResponseDto) responseMessage.getDataObject();
this.adhocService.handleScanMbusChannelsResponse(deviceMessageMetadata, responseMessage.getResult(), osgpException, scanMbusChannelsResponseDto);
} else {
throw new FunctionalException(FunctionalExceptionType.VALIDATION_ERROR, ComponentType.DOMAIN_SMART_METERING, new OsgpException(ComponentType.DOMAIN_SMART_METERING, "DataObject for response message should be of type ScanMbusChannelsResponseDto"));
}
}
Aggregations