Package com.itextpdf.tool.xml
Interface Pipeline<T extends CustomContext>
- Type Parameters:
T
- the type of CustomContext
- All Known Implementing Classes:
AbstractPipeline
,AutoDocPipeline
,CssResolverPipeline
,ElementHandlerPipeline
,HtmlPipeline
,PdfWriterPipeline
public interface Pipeline<T extends CustomContext>
-
Method Summary
Modifier and TypeMethodDescriptionPipeline
<?> close
(WorkerContext context, Tag t, ProcessObject po) Called when a closing tag has been encountered.Pipeline
<?> content
(WorkerContext context, Tag t, String content, ProcessObject po) Called when content has been encountered.Pipeline
<?> getNext()
Returns the next pipeline in line.Pipeline
<?> init
(WorkerContext context) The init method allows implementation to initialize the pipeline.Pipeline
<?> open
(WorkerContext context, Tag t, ProcessObject po) Called when an opening tag has been encountered.
-
Method Details
-
init
The init method allows implementation to initialize the pipeline. e.g. Initialize their CustomContext here and add it to the WorkerContext throughWorkerContext.put(String, CustomContext)
.- Parameters:
context
- the WorkerContext- Returns:
- the next pipeline in line
- Throws:
PipelineException
- can be thrown to indicate that something went wrong.
-
open
Called when an opening tag has been encountered.- Parameters:
context
- the WorkerContextt
- the Tagpo
- a processObject to putWritable
s in- Returns:
- the next pipeline in line
- Throws:
PipelineException
- can be thrown to indicate that something went wrong.
-
content
Pipeline<?> content(WorkerContext context, Tag t, String content, ProcessObject po) throws PipelineException Called when content has been encountered.- Parameters:
context
- the WorkerContextt
- the Tagcontent
- the contentpo
- a processObject to putWritable
s in- Returns:
- the next pipeline in line
- Throws:
PipelineException
- can be thrown to indicate that something went wrong.
-
close
Called when a closing tag has been encountered.- Parameters:
context
- the WorkerContextt
- the Tagpo
- a processObject to putWritable
s in- Returns:
- the next pipeline in line
- Throws:
PipelineException
- can be thrown to indicate that something went wrong.
-
getNext
Pipeline<?> getNext()Returns the next pipeline in line.- Returns:
- the next pipeline
-