class MessageProcessingSequence implements IMessageProcessingSequence, IDumpable {

    @Override
    public void callChain(final IReceiverChain chain)
            throws NestedChainStackOverflowException {
        int newStackIndex = stackIndex + 1;

        if (newStackIndex >= chainStack.length) {
            throw new NestedChainStackOverflowException(
                    Arrays.copyOf(chainStack, stackIndex + 1),
                    Arrays.copyOf(stepStack, stackIndex + 1));
        }

        chainStack[newStackIndex] = chain;
        stepStack[newStackIndex] = -1;

        stackIndex = newStackIndex;
    }

    public  MessageProcessingSequence(final int stackDepth, final IReceiverChain mainChain);

}