use of org.opensmartgridplatform.adapter.protocol.oslp.elster.device.requests.SwitchConfigurationBankRequest in project open-smart-grid-platform by OSGP.
the class CommonSwitchConfigurationRequestMessageProcessor method processMessage.
@Override
public void processMessage(final ObjectMessage message) {
LOGGER.debug("Processing common get configuration message");
MessageMetadata messageMetadata;
String configurationBank;
try {
messageMetadata = MessageMetadata.fromMessage(message);
configurationBank = (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 SwitchConfigurationBankRequest deviceRequest = new SwitchConfigurationBankRequest(DeviceRequest.newBuilder().messageMetaData(messageMetadata), configurationBank);
this.deviceService.switchConfiguration(deviceRequest);
}
Aggregations