public class CssResolverPipeline extends AbstractPipeline<ObjectContext<CSSResolver>>
open(WorkerContext, Tag, ProcessObject)
Modifier and Type | Field and Description |
---|---|
static String |
CSS_RESOLVER |
Constructor and Description |
---|
CssResolverPipeline(CSSResolver cssResolver, Pipeline> next) |
Modifier and Type | Method and Description |
---|---|
String |
getContextKey()
This allows the descendant classes to be fetched from the context.
|
Pipeline> |
init(WorkerContext context)
The init method allows implementation to initialize the pipeline.
|
Pipeline> |
open(WorkerContext context, Tag t, ProcessObject po)
Just calls getNext.
Override this to get notified on encountered opening tags. |
void |
setResolver(CSSResolver resolver)
Stores the cssResolver for the calling thread.
|
close, content, getLocalContext, getNext, setNext
public static final String CSS_RESOLVER
public CssResolverPipeline(CSSResolver cssResolver, Pipeline> next)
next
- the next pipeline.
cssResolver
- the CSSResolver
to use in this Pipeline, it will be stored in a ThreadLocal variable.
public String getContextKey()
getContextKey
in class AbstractPipeline<ObjectContext<CSSResolver>>
getClass().getName()
as name.
public Pipeline> init(WorkerContext context) throws PipelineException
Pipeline
WorkerContext.put(String, CustomContext)
.
init
in interface Pipeline<ObjectContext<CSSResolver>>
init
in class AbstractPipeline<ObjectContext<CSSResolver>>
context
- the WorkerContext
PipelineException
- can be thrown to indicate that something went wrong.
public Pipeline> open(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipeline
open
in interface Pipeline<ObjectContext<CSSResolver>>
open
in class AbstractPipeline<ObjectContext<CSSResolver>>
context
- the WorkerContext
t
- the Tag
po
- a processObject to put Writable
s in
PipelineException
- can be thrown to indicate that something went wrong.
public void setResolver(CSSResolver resolver)
resolver
- the CSSResolver to use.
Copyright © 1998–2017. All rights reserved.