class GetFirmwareFileMessageProcessor extends AbstractProtocolRequestMessageProcessor {

    @Override
    public void processMessage(final ObjectMessage message) throws JMSException {

        MessageMetadata metadata = null;
        Device device = null;
        String firmwareFileIdentification = StringUtils.EMPTY;

        try {
            metadata = MessageMetadata.fromMessage(message);
            LOGGER.info(
                    "[{}] - Received message of messageType: {}, organisationIdentification: {}, deviceIdentification: {}",
                    metadata.getCorrelationUid(), metadata.getMessageType(), metadata.getOrganisationIdentification(),
                    metadata.getDeviceIdentification());

            device = this.deviceRepository.findByDeviceIdentification(metadata.getDeviceIdentification());

            final RequestMessage requestMessage = (RequestMessage) message.getObject();
            firmwareFileIdentification = (String) requestMessage.getRequest();

            final FirmwareFile firmwareFile = this.firmwareFileRepository
                    .findByIdentification(firmwareFileIdentification);

            final FirmwareFileDto firmwareFileDto = new FirmwareFileDto(firmwareFile.getIdentification(),
                    firmwareFile.getFile());

            this.sendSuccesResponse(metadata, device.getProtocolInfo(), firmwareFileDto);

        } catch (final Exception e) {
            LOGGER.error("Exception while retrieving firmware file: {}", firmwareFileIdentification);
            final OsgpException osgpException = new OsgpException(ComponentType.OSGP_CORE,
                    "Exception while retrieving firmware file.", e);
            this.sendFailureResponse(metadata, device.getProtocolInfo(), osgpException);
        }
    }

    protected  GetFirmwareFileMessageProcessor();

}