Package org.apache.xml.security.stax.ext
Class AbstractInputProcessor
- java.lang.Object
-
- org.apache.xml.security.stax.ext.AbstractInputProcessor
-
- All Implemented Interfaces:
InputProcessor
- Direct Known Subclasses:
AbstractDecryptInputProcessor,AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessor,AbstractSignatureReferenceVerifyInputProcessor,AbstractSignatureReferenceVerifyInputProcessor.InternalSignatureReferenceVerifier,LogInputProcessor,XMLEventReaderInputProcessor,XMLSecurityInputProcessor,XMLSecurityInputProcessor.InternalBufferProcessor,XMLSecurityInputProcessor.InternalReplayProcessor
public abstract class AbstractInputProcessor extends java.lang.Object implements InputProcessor
An abstract InputProcessor class for reusabilty
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<java.lang.Object>afterProcessorsprivate java.util.Set<java.lang.Object>beforeProcessorsprivate XMLSecurityConstants.Phasephaseprivate XMLSecurityPropertiessecurityProperties
-
Constructor Summary
Constructors Constructor Description AbstractInputProcessor(XMLSecurityProperties securityProperties)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAfterProcessor(java.lang.Object processor)Add this processor after the given processorvoidaddBeforeProcessor(java.lang.Object processor)Add this processor before the given processorvoiddoFinal(InputProcessorChain inputProcessorChain)Will be called when the whole document is processed.java.util.Set<java.lang.Object>getAfterProcessors()This InputProcessor will be added after the processors in this setjava.util.Set<java.lang.Object>getBeforeProcessors()This InputProcessor will be added before the processors in this setXMLSecurityConstants.PhasegetPhase()The Phase in which this InputProcessor should be appliedjavax.xml.stream.events.AttributegetReferenceIDAttribute(XMLSecStartElement xmlSecStartElement)XMLSecurityPropertiesgetSecurityProperties()abstract XMLSecEventprocessNextEvent(InputProcessorChain inputProcessorChain)Will be called from the framework when the next XMLEvent is requestedabstract XMLSecEventprocessNextHeaderEvent(InputProcessorChain inputProcessorChain)Will be called from the framework when the next security-header XMLEvent is requestedvoidsetPhase(XMLSecurityConstants.Phase phase)
-
-
-
Field Detail
-
securityProperties
private final XMLSecurityProperties securityProperties
-
phase
private XMLSecurityConstants.Phase phase
-
beforeProcessors
private java.util.Set<java.lang.Object> beforeProcessors
-
afterProcessors
private java.util.Set<java.lang.Object> afterProcessors
-
-
Constructor Detail
-
AbstractInputProcessor
public AbstractInputProcessor(XMLSecurityProperties securityProperties)
-
-
Method Detail
-
getPhase
public XMLSecurityConstants.Phase getPhase()
Description copied from interface:InputProcessorThe Phase in which this InputProcessor should be applied- Specified by:
getPhasein interfaceInputProcessor- Returns:
- The Phase
-
setPhase
public void setPhase(XMLSecurityConstants.Phase phase)
-
addBeforeProcessor
public void addBeforeProcessor(java.lang.Object processor)
Description copied from interface:InputProcessorAdd this processor before the given processor- Specified by:
addBeforeProcessorin interfaceInputProcessor
-
getBeforeProcessors
public java.util.Set<java.lang.Object> getBeforeProcessors()
Description copied from interface:InputProcessorThis InputProcessor will be added before the processors in this set- Specified by:
getBeforeProcessorsin interfaceInputProcessor- Returns:
- The set with the named InputProcessors
-
addAfterProcessor
public void addAfterProcessor(java.lang.Object processor)
Description copied from interface:InputProcessorAdd this processor after the given processor- Specified by:
addAfterProcessorin interfaceInputProcessor
-
getAfterProcessors
public java.util.Set<java.lang.Object> getAfterProcessors()
Description copied from interface:InputProcessorThis InputProcessor will be added after the processors in this set- Specified by:
getAfterProcessorsin interfaceInputProcessor- Returns:
- The set with the named InputProcessors
-
processNextHeaderEvent
public abstract XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws javax.xml.stream.XMLStreamException, XMLSecurityException
Description copied from interface:InputProcessorWill be called from the framework when the next security-header XMLEvent is requested- Specified by:
processNextHeaderEventin interfaceInputProcessor- Returns:
- The next XMLSecEvent
- Throws:
javax.xml.stream.XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
processNextEvent
public abstract XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws javax.xml.stream.XMLStreamException, XMLSecurityException
Description copied from interface:InputProcessorWill be called from the framework when the next XMLEvent is requested- Specified by:
processNextEventin interfaceInputProcessor- Returns:
- The next XMLSecEvent
- Throws:
javax.xml.stream.XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
doFinal
public void doFinal(InputProcessorChain inputProcessorChain) throws javax.xml.stream.XMLStreamException, XMLSecurityException
Description copied from interface:InputProcessorWill be called when the whole document is processed.- Specified by:
doFinalin interfaceInputProcessor- Throws:
javax.xml.stream.XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
getSecurityProperties
public XMLSecurityProperties getSecurityProperties()
-
getReferenceIDAttribute
public javax.xml.stream.events.Attribute getReferenceIDAttribute(XMLSecStartElement xmlSecStartElement)
-
-