Package org.apache.xml.security.stax.ext

Examples of org.apache.xml.security.stax.ext.AbstractInputProcessor


                    final ArrayDeque<XMLSecEvent> xmlSecEventList = internalBufferProcessor.getXmlSecEventList();
                    //remove the last event (EncryptedData)
                    xmlSecEventList.pollFirst();

                    // temporary processor to return the EncryptedData element for the DecryptionProcessor
                    AbstractInputProcessor abstractInputProcessor = new AbstractInputProcessor(getSecurityProperties()) {
                        @Override
                        public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain)
                                throws XMLStreamException, XMLSecurityException {
                            return processNextEvent(inputProcessorChain);
                        }

                        @Override
                        public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain)
                                throws XMLStreamException, XMLSecurityException {
                            inputProcessorChain.removeProcessor(this);
                            return xmlSecStartElement;
                        }
                    };
                    abstractInputProcessor.setPhase(XMLSecurityConstants.Phase.PREPROCESSING);
                    abstractInputProcessor.addBeforeProcessor(decryptInputProcessor);
                    inputProcessorChain.addProcessor(abstractInputProcessor);

                    //fetch the next event from the original chain
                    inputProcessorChain.reset();
                    xmlSecEvent = inputProcessorChain.processEvent();
View Full Code Here


                        internalReplayProcessor.getAfterProcessors().clear();
                        internalReplayProcessor.getBeforeProcessors().clear();
                        internalReplayProcessor.addAfterProcessor(XMLDecryptInputProcessor.class.getName());
                        subInputProcessorChain.addProcessor(internalReplayProcessor);

                        AbstractInputProcessor abstractInputProcessor = new AbstractInputProcessor(getSecurityProperties()) {
                            @Override
                            public XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
                                return null;
                            }

                            @Override
                            public XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
                                inputProcessorChain.removeProcessor(this);
                                return xmlSecStartElement;
                            }
                        };
                        abstractInputProcessor.setPhase(XMLSecurityConstants.Phase.PREPROCESSING);
                        abstractInputProcessor.addBeforeProcessor(XMLSecurityInputProcessor.class.getName());
                        abstractInputProcessor.addAfterProcessor(XMLEventReaderInputProcessor.class.getName());
                        subInputProcessorChain.addProcessor(abstractInputProcessor);

                        //remove this processor from chain now. the next events will go directly to the other processors
                        subInputProcessorChain.removeProcessor(this);
                        //since we cloned the inputProcessor list we have to add the processors from
View Full Code Here

TOP

Related Classes of org.apache.xml.security.stax.ext.AbstractInputProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.