class UpdateFirmwareRequestMessageProcessor extends DeviceRequestMessageProcessor {

    @Override
    public void processMessage(final ObjectMessage message) {
        LOGGER.debug("Processing {} request message", this.messageType);
        MessageMetadata messageMetadata = null;

        try {
            messageMetadata = MessageMetadata.fromMessage(message);

            LOGGER.info("{} called for device: {} for organisation: {}", messageMetadata.getMessageType(),
                    messageMetadata.getDeviceIdentification(), messageMetadata.getOrganisationIdentification());

            final String firmwareIdentification = (String) message.getObject();

            if (this.firmwareService.isFirmwareFileAvailable(firmwareIdentification)) {
                LOGGER.info("[{}] - Firmware file [{}] available. Updating firmware on device [{}]",
                        messageMetadata.getCorrelationUid(), firmwareIdentification,
                        messageMetadata.getDeviceIdentification());
                this.processUpdateFirmwareRequest(messageMetadata, firmwareIdentification);
            } else {
                LOGGER.info("[{}] - Firmware file [{}] not available. Sending GetFirmwareFile request to core.",
                        messageMetadata.getCorrelationUid(), firmwareIdentification);
                this.sendGetFirmwareFileRequest(messageMetadata, firmwareIdentification);
            }
        } catch (final JMSException exception) {
            this.logJmsException(LOGGER, exception, messageMetadata);
        }

    }

    protected  UpdateFirmwareRequestMessageProcessor();

}