|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.isdc.wro.extensions.processor.js.AbstractNodeWithFallbackProcessor
public abstract class AbstractNodeWithFallbackProcessor
An abstract processor which should be extended by processors which can provide both: node & a fallback (usually rhino) implementation of processor. The node version of processor is preferred, but if unavailable - the fallback will be used.
Constructor Summary | |
---|---|
AbstractNodeWithFallbackProcessor()
|
Method Summary | |
---|---|
protected abstract ResourcePreProcessor |
createFallbackProcessor()
Lazily initialize the rhinoProcessor. |
protected abstract ResourcePreProcessor |
createNodeProcessor()
|
void |
process(Reader reader,
Writer writer)
Perform actual resource processing. |
void |
process(Resource resource,
Reader reader,
Writer writer)
Process a content supplied by a reader and perform some sort of processing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractNodeWithFallbackProcessor()
Method Detail |
---|
protected abstract ResourcePreProcessor createNodeProcessor()
ResourcePreProcessor
used as a primary processor.public final void process(Resource resource, Reader reader, Writer writer) throws IOException
Resource
, because
this way you can ignore the other preProcessors from the chain.RuntimeException
and the processing chain is interrupted (by default)WroConfiguration.isIgnoreFailingProcessor()
is true)
process
in interface ResourcePreProcessor
resource
- the original resource as it found in the model.reader
- Reader
used to read processed resource content.writer
- Writer
where used to write processed results.
IOException
- when an exception occurs. The future version will change the exception type to Exception
, because
any exception may occur during processing. The processing failure will be handled based on value of
WroConfiguration.isIgnoreFailingProcessor()
configuration flag.public final void process(Reader reader, Writer writer) throws IOException
process
in interface ResourcePostProcessor
reader
- source stream.writer
- destination stream.
IOException
protected abstract ResourcePreProcessor createFallbackProcessor()
ResourcePreProcessor
used as a fallback processor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |