class MessageProcessor implements ITask, IMessageProcessor, IManagedTask, IShutdownAwareTask {

    @Override
    public void process(final IObject theMessage, final IObject theContext)
            throws InvalidArgumentException, MessageProcessorProcessException {
        // TODO: Ensure that there is no process in progress
        this.message = theMessage;
        this.context = theContext;

        try {
            this.response = IOC.resolve(IOC.resolve(IOC.getKeyForKeyStorage(), "info.smart_tools.smartactors.iobject.iobject.IObject"));

            rawEnvironment.setValue(configFieldName, config);
            rawEnvironment.setValue(sequenceFieldName, messageProcessingSequence);
            rawEnvironment.setValue(responseFieldName, response);
            rawEnvironment.setValue(messageFieldName, theMessage);
            rawEnvironment.setValue(contextFieldName, theContext);
            rawEnvironment.setValue(processorFieldName, this);

            currentEnvironment = rawEnvironment;

            List finalActionsList = (List) context.getValue(finalActionsFieldName);

            if (null == finalActionsList) {
                finalActionsList = new ArrayList(1);
                context.setValue(finalActionsFieldName, finalActionsList);
            }

            finalActionsList.add((IAction<IObject>) env -> {
                try {
                    upCounter.down();
                } catch (UpCounterCallbackExecutionException | IllegalUpCounterState e) {
                    throw new ActionExecuteException(e);
                }
            });

            upCounter.up();

            notifiedOnShutdown = false;
            shutdownStatus = null;
        } catch (ReadValueException | ChangeValueException | InvalidArgumentException | ResolutionException | IllegalUpCounterState e) {
            throw new MessageProcessorProcessException(e);
        }

        enqueue();
    }

    public  MessageProcessor(final IQueue<ITask> taskQueue, final IMessageProcessingSequence messageProcessingSequence, final IObject config);

}