Package org.apache.sling.rewriter
Interface Processor
public interface Processor
A
Processor post processes the output.-
Method Summary
Modifier and TypeMethodDescriptionvoidfinished(boolean errorOccurred) Clean up the processor.Get the content handler to write the output to.Get the writer to write the output to.voidinit(ProcessingContext context, ProcessorConfiguration config) Initialize this component.
-
Method Details
-
init
Initialize this component.- Parameters:
context- The invocation context.config- The configuration for this component.- Throws:
IOException- If an error occurs
-
getWriter
PrintWriter getWriter()Get the writer to write the output to.- Returns:
- A print writer.
-
getContentHandler
ContentHandler getContentHandler()Get the content handler to write the output to.- Returns:
- A content handler
-
finished
Clean up the processor. This method should always be called after a processor run, regardless if it was successful or failed.- Parameters:
errorOccurred- Indicates if an error occurred during processing- Throws:
IOException- in case of problems
-