Class ElementHandlerPipeline
- java.lang.Object
-
- com.itextpdf.tool.xml.pipeline.AbstractPipeline
-
- com.itextpdf.tool.xml.pipeline.end.ElementHandlerPipeline
-
- All Implemented Interfaces:
Pipeline
public class ElementHandlerPipeline extends AbstractPipeline
As thePdfWriterPipelinebut this one just passes everything on to anElementHandler. Allowing you to get allWritables at the end of the pipeline. (or in between)
-
-
Field Summary
Fields Modifier and Type Field Description private ElementHandlerhandler
-
Constructor Summary
Constructors Constructor Description ElementHandlerPipeline(ElementHandler handler, Pipeline next)Does not use a context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pipelineclose(WorkerContext context, Tag t, ProcessObject po)Just calls getNext.
Override this to get notified on encountered closing tags.private voidconsume(ProcessObject po)Pipeline<?>content(WorkerContext ctx, Tag currentTag, java.lang.String text, ProcessObject po)Just calls getNext.
Override this to get notified on encountered content.Pipelineopen(WorkerContext context, Tag t, ProcessObject po)Just calls getNext.
Override this to get notified on encountered opening tags.-
Methods inherited from class com.itextpdf.tool.xml.pipeline.AbstractPipeline
getContextKey, getLocalContext, getNext, init, setNext
-
-
-
-
Field Detail
-
handler
private final ElementHandler handler
-
-
Constructor Detail
-
ElementHandlerPipeline
public ElementHandlerPipeline(ElementHandler handler, Pipeline next)
Does not use a context.- Parameters:
handler- the ElementHandlernext- the next pipeline in line. (ornullif none )
-
-
Method Detail
-
open
public Pipeline open(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
Description copied from class:AbstractPipelineJust calls getNext.
Override this to get notified on encountered opening tags.- Specified by:
openin interfacePipeline- Overrides:
openin classAbstractPipeline- Parameters:
context- the WorkerContextt- the Tagpo- a processObject to putWritables in- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
consume
private void consume(ProcessObject po)
- Parameters:
po-
-
content
public Pipeline<?> content(WorkerContext ctx, Tag currentTag, java.lang.String text, ProcessObject po) throws PipelineException
Description copied from class:AbstractPipelineJust calls getNext.
Override this to get notified on encountered content.- Specified by:
contentin interfacePipeline- Overrides:
contentin classAbstractPipeline- Parameters:
ctx- the WorkerContextcurrentTag- the Tagtext- the contentpo- a processObject to putWritables in- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
close
public Pipeline close(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
Description copied from class:AbstractPipelineJust calls getNext.
Override this to get notified on encountered closing tags.- Specified by:
closein interfacePipeline- Overrides:
closein classAbstractPipeline- Parameters:
context- the WorkerContextt- the Tagpo- a processObject to putWritables in- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
-