Class InputProcessorChainImpl

    • Field Detail

      • LOG

        protected static final transient org.slf4j.Logger LOG
      • inputProcessors

        private java.util.List<InputProcessor> inputProcessors
      • startPos

        private int startPos
      • curPos

        private int curPos
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: ProcessorChain
        resets the chain so that the next event will go again to the first processor in the chain.
        Specified by:
        reset in interface ProcessorChain
      • addProcessor

        public void addProcessor​(InputProcessor newInputProcessor)
        Description copied from interface: InputProcessorChain
        Adds an InputProcessor to the chain. The place where it will be applied can be controlled through the Phase, getBeforeProcessors and getAfterProcessors. @see Interface InputProcessor
        Specified by:
        addProcessor in interface InputProcessorChain
        Parameters:
        newInputProcessor - The InputProcessor which should be placed in the chain
      • doFinal

        public void doFinal()
                     throws javax.xml.stream.XMLStreamException,
                            XMLSecurityException
        Description copied from interface: ProcessorChain
        Will finally be called when the whole document is processed Important note: Every processor in the chain has to call doFinal() in its own doFinal() method. InputProcessors should call it before doing other stuff to keep the processing order. Remember the input-chain is in principle processed in the reverse order since we "leech" the events through the chain. So that means that we should do the same for the doFinal method, otherwise we may run into troubles.
        Specified by:
        doFinal in interface ProcessorChain
        Throws:
        javax.xml.stream.XMLStreamException - thrown when a streaming error occurs
        XMLSecurityException - thrown when a Security failure occurs
      • createSubChain

        public InputProcessorChain createSubChain​(InputProcessor inputProcessor)
                                           throws javax.xml.stream.XMLStreamException,
                                                  XMLSecurityException
        Description copied from interface: InputProcessorChain
        Create a new SubChain. The XMLEvents will be only be processed from the given InputProcessor to the end. All earlier InputProcessors don't get these events. In other words the chain will be splitted in two parts. The associated DocumentContext will be cloned.
        Specified by:
        createSubChain in interface InputProcessorChain
        Parameters:
        inputProcessor - The InputProcessor position the XMLEvents should be processed over this SubChain.
        Returns:
        A new InputProcessorChain
        Throws:
        javax.xml.stream.XMLStreamException - thrown when a streaming error occurs
        XMLSecurityException - thrown when a Security failure occurs
      • createSubChain

        public InputProcessorChain createSubChain​(InputProcessor inputProcessor,
                                                  boolean clone)
                                           throws javax.xml.stream.XMLStreamException,
                                                  XMLSecurityException
        Description copied from interface: InputProcessorChain
        Create a new SubChain. The XMLEvents will be only be processed from the given InputProcessor to the end. All earlier InputProcessors don't get these events. In other words the chain will be splitted in two parts. The parameter clone controls if the associated DocumentContext should be cloned or reference the existing one.
        Specified by:
        createSubChain in interface InputProcessorChain
        Parameters:
        inputProcessor - The InputProcessor position the XMLEvents should be processed over this SubChain.
        clone - if true the associated DocumentContext will be cloned otherwise the DocumentContext will be referenced.
        Returns:
        A new InputProcessorChain
        Throws:
        javax.xml.stream.XMLStreamException - thrown when a streaming error occurs
        XMLSecurityException - thrown when a Security failure occurs