Search in sources :

Example 1 with AddRtuDeviceRequest

use of org.opensmartgridplatform.domain.core.valueobjects.AddRtuDeviceRequest in project open-smart-grid-platform by OSGP.

the class AddDeviceRequestMessageProcessor method processMessage.

@Override
public void processMessage(final ObjectMessage message) throws JMSException {
    final MessageMetadata deviceMessageMetadata = MessageMetadata.fromMessage(message);
    final AddRtuDeviceRequest addRtuDeviceRequest = (AddRtuDeviceRequest) message.getObject();
    try {
        this.deviceManagementService.addDevice(deviceMessageMetadata, addRtuDeviceRequest);
    } catch (final FunctionalException e) {
        this.handleError(e, deviceMessageMetadata.getCorrelationUid(), deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification(), deviceMessageMetadata.getMessageType());
    }
}
Also used : MessageMetadata(org.opensmartgridplatform.shared.infra.jms.MessageMetadata) AddRtuDeviceRequest(org.opensmartgridplatform.domain.core.valueobjects.AddRtuDeviceRequest) FunctionalException(org.opensmartgridplatform.shared.exceptionhandling.FunctionalException)

Aggregations

AddRtuDeviceRequest (org.opensmartgridplatform.domain.core.valueobjects.AddRtuDeviceRequest)1 FunctionalException (org.opensmartgridplatform.shared.exceptionhandling.FunctionalException)1 MessageMetadata (org.opensmartgridplatform.shared.infra.jms.MessageMetadata)1