Package org.apache.xml.security.stax.ext
Interface InputProcessorChain
-
- All Superinterfaces:
ProcessorChain
- All Known Implementing Classes:
InputProcessorChainImpl
public interface InputProcessorChain extends ProcessorChain
The InputProcessorChain manages the InputProcessors and controls the XMLEvent flow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addProcessor(InputProcessor inputProcessor)
Adds an InputProcessor to the chain.InputProcessorChain
createSubChain(InputProcessor inputProcessor)
Create a new SubChain.InputProcessorChain
createSubChain(InputProcessor inputProcessor, boolean clone)
Create a new SubChain.DocumentContext
getDocumentContext()
The actual processed document's document contextjava.util.List<InputProcessor>
getProcessors()
Returns a list with the active processors.InboundSecurityContext
getSecurityContext()
The actual processed document's security contextXMLSecEvent
processEvent()
Requests the next XMLEvent from the next processor in the chain.XMLSecEvent
processHeaderEvent()
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 Detail
-
addProcessor
void addProcessor(InputProcessor inputProcessor)
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
void removeProcessor(InputProcessor inputProcessor)
Removes the specified InputProcessor from this chain.- Parameters:
inputProcessor
- to remove
-
getProcessors
java.util.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 javax.xml.stream.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:
javax.xml.stream.XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-
createSubChain
InputProcessorChain createSubChain(InputProcessor inputProcessor, boolean clone) throws javax.xml.stream.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:
javax.xml.stream.XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-
processHeaderEvent
XMLSecEvent processHeaderEvent() throws javax.xml.stream.XMLStreamException, XMLSecurityException
Requests the next security header XMLEvent from the next processor in the chain.- Returns:
- The next XMLEvent from the previous processor
- Throws:
javax.xml.stream.XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-
processEvent
XMLSecEvent processEvent() throws javax.xml.stream.XMLStreamException, XMLSecurityException
Requests the next XMLEvent from the next processor in the chain.- Returns:
- The next XMLEvent from the previous processor
- Throws:
javax.xml.stream.XMLStreamException
- thrown when a streaming error occursXMLSecurityException
- thrown when a Security failure occurs
-
-