class DeviceResponseMessageService {

    public void processMessage(final ProtocolResponseMessage message) {
        LOGGER.info("Processing protocol response message with correlation uid [{}]", message.getCorrelationUid());

        try {
            synchronized (this) {
                this.deviceCommunicationInformationService.updateDeviceConnectionInformation(message);
            }

            if (message.isScheduled() && !message.bypassRetry()) {
                LOGGER.info("Handling scheduled protocol response message.");
                this.handleScheduledTask(message);
            } else {
                LOGGER.info("Handling protocol response message.");
                this.handleProtocolResponseMessage(message);
            }
        } catch (final FunctionalException e) {
            LOGGER.error("Exception: {}, StackTrace: {}", e.getMessage(), e.getStackTrace(), e);
        }
    }

}