Package org.apache.xml.security.stax.ext
Interface InputProcessorChain
- All Superinterfaces:
ProcessorChain
- All Known Implementing Classes:
InputProcessorChainImpl
The InputProcessorChain manages the InputProcessors and controls the XMLEvent flow
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProcessor
(InputProcessor inputProcessor) Adds an InputProcessor to the chain.createSubChain
(InputProcessor inputProcessor) Create a new SubChain.createSubChain
(InputProcessor inputProcessor, boolean clone) Create a new SubChain.The actual processed document's document contextReturns a list with the active processors.The actual processed document's security contextRequests the next XMLEvent from the next processor in the chain.Requests the next security header XMLEvent from the next processor in the chain.void
removeProcessor
(InputProcessor inputProcessor) Removes the specified InputProcessor from this chain.Methods inherited from interface org.apache.xml.security.stax.ext.ProcessorChain
doFinal, reset
-
Method Details
-
addProcessor
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- Parameters:
inputProcessor
- The InputProcessor which should be placed in the chain
-
removeProcessor
Removes the specified InputProcessor from this chain.- Parameters:
inputProcessor
- to remove
-
getProcessors
List<InputProcessor> getProcessors()Returns a list with the active processors.- Returns:
- a list with the active processors
-
getSecurityContext
InboundSecurityContext getSecurityContext()The actual processed document's security context- Returns:
- The InboundSecurityContext
-
getDocumentContext
DocumentContext getDocumentContext()The actual processed document's document context- Returns:
- The DocumentContext
-
createSubChain
InputProcessorChain createSubChain(InputProcessor inputProcessor) throws XMLStreamException, XMLSecurityException 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.- Parameters:
inputProcessor
- The InputProcessor position the XMLEvents should be processed over this SubChain.- Returns:
- A new InputProcessorChain
- Throws:
XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-
createSubChain
InputProcessorChain createSubChain(InputProcessor inputProcessor, boolean clone) throws XMLStreamException, XMLSecurityException 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.- 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:
XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-
processHeaderEvent
Requests the next security header XMLEvent from the next processor in the chain.- Returns:
- The next XMLEvent from the previous processor
- Throws:
XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-
processEvent
Requests the next XMLEvent from the next processor in the chain.- Returns:
- The next XMLEvent from the previous processor
- Throws:
XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-