Search in sources :

Example 1 with ScanMbusChannelsResponseDto

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"));
    }
}
Also used : ScanMbusChannelsResponseDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.ScanMbusChannelsResponseDto) OsgpException(org.opensmartgridplatform.shared.exceptionhandling.OsgpException) FunctionalException(org.opensmartgridplatform.shared.exceptionhandling.FunctionalException)

Aggregations

ScanMbusChannelsResponseDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.ScanMbusChannelsResponseDto)1 FunctionalException (org.opensmartgridplatform.shared.exceptionhandling.FunctionalException)1 OsgpException (org.opensmartgridplatform.shared.exceptionhandling.OsgpException)1