Source:
public void processSignedOslpEnvelope(final String deviceIdentification, final SignedOslpEnvelopeDto signedOslpEnvelopeDto) { final UnsignedOslpEnvelopeDto unsignedOslpEnvelopeDto = signedOslpEnvelopeDto.getUnsignedOslpEnvelopeDto(); final OslpEnvelope oslpEnvelope = signedOslpEnvelopeDto.getOslpEnvelope(); final String correlationUid = unsignedOslpEnvelopeDto.getCorrelationUid(); final String organisationIdentification = unsignedOslpEnvelopeDto.getOrganisationIdentification(); final String domain = unsignedOslpEnvelopeDto.getDomain(); final String domainVersion = unsignedOslpEnvelopeDto.getDomainVersion(); final String messageType = unsignedOslpEnvelopeDto.getMessageType(); final String ipAddress = unsignedOslpEnvelopeDto.getIpAddress(); final int retryCount = unsignedOslpEnvelopeDto.getRetryCount(); final boolean isScheduled = unsignedOslpEnvelopeDto.isScheduled(); final DeviceResponseHandler deviceResponseHandler = new DeviceResponseHandler() { @Override public void handleResponse(final DeviceResponse deviceResponse) { CommonGetFirmwareRequestMessageProcessor.this.handleGetFirmwareVersionDeviceResponse(deviceResponse, CommonGetFirmwareRequestMessageProcessor.this.responseMessageSender, domain, domainVersion, messageType, retryCount); } @Override public void handleException(final Throwable t, final DeviceResponse deviceResponse) { CommonGetFirmwareRequestMessageProcessor.this.handleUnableToConnectDeviceResponse(deviceResponse, t, null, CommonGetFirmwareRequestMessageProcessor.this.responseMessageSender, deviceResponse, domain, domainVersion, messageType, isScheduled, retryCount); } }; final DeviceRequest deviceRequest = new DeviceRequest(organisationIdentification, deviceIdentification, correlationUid); try { this.deviceService.doGetFirmwareVerion(oslpEnvelope, deviceRequest, deviceResponseHandler, ipAddress); } catch (final IOException e) { this.handleError(e, correlationUid, organisationIdentification, deviceIdentification, domain, domainVersion, messageType, retryCount); } }

Target:
public void processSignedOslpEnvelope(final String deviceIdentification, final SignedOslpEnvelopeDto signedOslpEnvelopeDto) { final UnsignedOslpEnvelopeDto unsignedOslpEnvelopeDto = signedOslpEnvelopeDto.getUnsignedOslpEnvelopeDto(); final OslpEnvelope oslpEnvelope = signedOslpEnvelopeDto.getOslpEnvelope(); final String correlationUid = unsignedOslpEnvelopeDto.getCorrelationUid(); final String organisationIdentification = unsignedOslpEnvelopeDto.getOrganisationIdentification(); final String domain = unsignedOslpEnvelopeDto.getDomain(); final String domainVersion = unsignedOslpEnvelopeDto.getDomainVersion(); final String messageType = unsignedOslpEnvelopeDto.getMessageType(); final String ipAddress = unsignedOslpEnvelopeDto.getIpAddress(); final int retryCount = unsignedOslpEnvelopeDto.getRetryCount(); final boolean isScheduled = unsignedOslpEnvelopeDto.isScheduled(); final DeviceResponseHandler deviceResponseHandler = new DeviceResponseHandler() { @Override public void handleResponse(final DeviceResponse deviceResponse) { CommonGetFirmwareRequestMessageProcessor.this.handleGetFirmwareVersionDeviceResponse(deviceResponse, CommonGetFirmwareRequestMessageProcessor.this.responseMessageSender, domain, domainVersion, messageType, retryCount); } @Override public void handleException(final Throwable t, final DeviceResponse deviceResponse) { CommonGetFirmwareRequestMessageProcessor.this.handleUnableToConnectDeviceResponse(deviceResponse, t, null, CommonGetFirmwareRequestMessageProcessor.this.responseMessageSender, deviceResponse, domain, domainVersion, messageType, isScheduled, retryCount); } }; final DeviceRequest deviceRequest = new DeviceRequest(organisationIdentification, deviceIdentification, correlationUid); try { this.deviceService.doGetFirmwareVersion(oslpEnvelope, deviceRequest, deviceResponseHandler, ipAddress); } catch (final IOException e) { this.handleError(e, correlationUid, organisationIdentification, deviceIdentification, domain, domainVersion, messageType, retryCount); } }