use of org.opensmartgridplatform.adapter.protocol.oslp.elster.device.requests.SwitchFirmwareDeviceRequest in project open-smart-grid-platform by OSGP.
the class CommonSwitchFirmwareRequestMessageProcessor method processMessage.
@Override
public void processMessage(final ObjectMessage message) {
LOGGER.debug("Processing common switch firmware message");
MessageMetadata messageMetadata;
String version;
try {
messageMetadata = MessageMetadata.fromMessage(message);
version = (String) message.getObject();
} catch (final JMSException e) {
LOGGER.error("UNRECOVERABLE ERROR, unable to read ObjectMessage instance, giving up.", e);
return;
}
this.printDomainInfo(messageMetadata.getMessageType(), messageMetadata.getDomain(), messageMetadata.getDomainVersion());
final SwitchFirmwareDeviceRequest deviceRequest = new SwitchFirmwareDeviceRequest(DeviceRequest.newBuilder().messageMetaData(messageMetadata), version);
this.deviceService.switchFirmware(deviceRequest);
}
Aggregations