class ChainCallReceiver implements IMessageReceiver {

    @Override
    public void receive(final IMessageProcessor processor)
            throws MessageReceiveException {
        try {
            Object chainId = chainChoiceStrategy.chooseChain(processor);
            IReceiverChain chain = chainStorage.resolve(chainId);
            checkAccess(chain, processor);
            processor.getSequence().callChain(chain);
        } catch (ChainChoiceException | ChainNotFoundException | NestedChainStackOverflowException e) {
            throw new MessageReceiveException("Could not call nested chain.", e);
        }
    }

    public  ChainCallReceiver(final IChainStorage chainStorage, final IChainChoiceStrategy chainChoiceStrategy);

}