Class AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessor
- java.lang.Object
-
- org.apache.xml.security.stax.ext.AbstractInputProcessor
-
- org.apache.xml.security.stax.impl.processor.input.AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessor
-
- All Implemented Interfaces:
java.lang.Thread.UncaughtExceptionHandler,InputProcessor
- Direct Known Subclasses:
XMLDecryptInputProcessor.DecryptedEventReaderInputProcessor
- Enclosing class:
- AbstractDecryptInputProcessor
public abstract class AbstractDecryptInputProcessor.AbstractDecryptedEventReaderInputProcessor extends AbstractInputProcessor implements java.lang.Thread.UncaughtExceptionHandler
The DecryptedEventReaderInputProcessor reads the decrypted stream with a StAX reader and forwards the generated XMLEvents
-
-
Field Summary
Fields Modifier and Type Field Description private intcurrentXMLStructureDepthprivate java.lang.ThreaddecryptionThreadprivate EncryptedDataTypeencryptedDataTypeprivate booleanencryptedHeaderprivate InboundSecurityTokeninboundSecurityTokenprivate XMLSecStartElementparentXmlSecStartElementprivate booleanrootElementProcessedprivate java.lang.ThrowablethrownExceptionprivate javax.xml.stream.XMLStreamReaderxmlStreamReader
-
Constructor Summary
Constructors Constructor Description AbstractDecryptedEventReaderInputProcessor(XMLSecurityProperties securityProperties, SecurePart.Modifier encryptionModifier, boolean encryptedHeader, XMLSecStartElement xmlSecStartElement, EncryptedDataType encryptedDataType, AbstractDecryptInputProcessor abstractDecryptInputProcessor, InboundSecurityToken inboundSecurityToken)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidhandleEncryptedElement(InputProcessorChain inputProcessorChain, XMLSecStartElement xmlSecStartElement, InboundSecurityToken inboundSecurityToken, EncryptedDataType encryptedDataType)private XMLSecEventprocessEvent(InputProcessorChain inputProcessorChain, boolean headerEvent)XMLSecEventprocessNextEvent(InputProcessorChain inputProcessorChain)Will be called from the framework when the next XMLEvent is requestedXMLSecEventprocessNextHeaderEvent(InputProcessorChain inputProcessorChain)Will be called from the framework when the next security-header XMLEvent is requestedvoidsetDecryptionThread(java.lang.Thread decryptionThread)voidsetXmlStreamReader(javax.xml.stream.XMLStreamReader xmlStreamReader)private voidtestAndThrowUncaughtException()voiduncaughtException(java.lang.Thread t, java.lang.Throwable e)-
Methods inherited from class org.apache.xml.security.stax.ext.AbstractInputProcessor
addAfterProcessor, addBeforeProcessor, doFinal, getAfterProcessors, getBeforeProcessors, getPhase, getReferenceIDAttribute, getSecurityProperties, setPhase
-
-
-
-
Field Detail
-
currentXMLStructureDepth
private int currentXMLStructureDepth
-
xmlStreamReader
private javax.xml.stream.XMLStreamReader xmlStreamReader
-
parentXmlSecStartElement
private XMLSecStartElement parentXmlSecStartElement
-
encryptedHeader
private boolean encryptedHeader
-
inboundSecurityToken
private final InboundSecurityToken inboundSecurityToken
-
rootElementProcessed
private boolean rootElementProcessed
-
encryptedDataType
private EncryptedDataType encryptedDataType
-
decryptionThread
private java.lang.Thread decryptionThread
-
thrownException
private volatile java.lang.Throwable thrownException
-
-
Constructor Detail
-
AbstractDecryptedEventReaderInputProcessor
public AbstractDecryptedEventReaderInputProcessor(XMLSecurityProperties securityProperties, SecurePart.Modifier encryptionModifier, boolean encryptedHeader, XMLSecStartElement xmlSecStartElement, EncryptedDataType encryptedDataType, AbstractDecryptInputProcessor abstractDecryptInputProcessor, InboundSecurityToken inboundSecurityToken)
-
-
Method Detail
-
setDecryptionThread
public void setDecryptionThread(java.lang.Thread decryptionThread)
-
setXmlStreamReader
public void setXmlStreamReader(javax.xml.stream.XMLStreamReader xmlStreamReader)
-
processNextHeaderEvent
public 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- Specified by:
processNextHeaderEventin classAbstractInputProcessor- Returns:
- The next XMLSecEvent
- Throws:
javax.xml.stream.XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
processNextEvent
public 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- Specified by:
processNextEventin classAbstractInputProcessor- Returns:
- The next XMLSecEvent
- Throws:
javax.xml.stream.XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
processEvent
private XMLSecEvent processEvent(InputProcessorChain inputProcessorChain, boolean headerEvent) throws javax.xml.stream.XMLStreamException, XMLSecurityException
- Throws:
javax.xml.stream.XMLStreamExceptionXMLSecurityException
-
handleEncryptedElement
protected abstract void handleEncryptedElement(InputProcessorChain inputProcessorChain, XMLSecStartElement xmlSecStartElement, InboundSecurityToken inboundSecurityToken, EncryptedDataType encryptedDataType) throws XMLSecurityException
- Throws:
XMLSecurityException
-
uncaughtException
public void uncaughtException(java.lang.Thread t, java.lang.Throwable e)- Specified by:
uncaughtExceptionin interfacejava.lang.Thread.UncaughtExceptionHandler
-
testAndThrowUncaughtException
private void testAndThrowUncaughtException() throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
-