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