Class OutputProcessorChainImpl

    • Field Detail

      • LOG

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

        private java.util.List<OutputProcessor> outputProcessors
      • 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​(OutputProcessor newOutputProcessor)
        Description copied from interface: OutputProcessorChain
        Adds an OutputProcessor to the chain. The place where it will be applied can be controlled through the Phase, getBeforeProcessors and getAfterProcessors. @see Interface OutputProcessor
        Specified by:
        addProcessor in interface OutputProcessorChain
        Parameters:
        newOutputProcessor - The OutputProcessor which should be placed in the chain
      • setParentXmlSecStartElement

        private void setParentXmlSecStartElement​(XMLSecStartElement xmlSecStartElement)
      • processEvent

        public void processEvent​(XMLSecEvent xmlSecEvent)
                          throws javax.xml.stream.XMLStreamException,
                                 XMLSecurityException
        Description copied from interface: OutputProcessorChain
        Forwards the XMLEvent to the next processor in the chain.
        Specified by:
        processEvent in interface OutputProcessorChain
        Parameters:
        xmlSecEvent - The XMLEvent which should be forwarded to the next processor
        Throws:
        javax.xml.stream.XMLStreamException - thrown when a streaming error occurs
        XMLSecurityException - thrown when a Security failure occurs
      • 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 OutputProcessorChain createSubChain​(OutputProcessor outputProcessor)
                                            throws javax.xml.stream.XMLStreamException,
                                                   XMLSecurityException
        Description copied from interface: OutputProcessorChain
        Create a new SubChain. The XMLEvents will be only be processed from the given OutputProcessor to the end. All earlier OutputProcessors don't get these events. In other words the chain will be splitted in two parts.
        Specified by:
        createSubChain in interface OutputProcessorChain
        Parameters:
        outputProcessor - The OutputProcessor position the XMLEvents should be processed over this SubChain.
        Returns:
        A new OutputProcessorChain
        Throws:
        javax.xml.stream.XMLStreamException - thrown when a streaming error occurs
        XMLSecurityException - thrown when a Security failure occurs