Pipeline<ObjectContext<CSSResolver>>
public class CssResolverPipeline extends AbstractPipeline<ObjectContext<CSSResolver>>
open(WorkerContext, Tag, ProcessObject)
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
CSS_RESOLVER |
Constructor | Description |
---|---|
CssResolverPipeline(CSSResolver cssResolver,
Pipeline<?> next) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.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 java.lang.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 java.lang.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 WorkerContextPipelineException
- 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 WorkerContextt
- the Tagpo
- a processObject to put Writable
s inPipelineException
- can be thrown to indicate that something went wrong.public void setResolver(CSSResolver resolver)
resolver
- the CSSResolver to use.Copyright © 1998–2018. All rights reserved.