Package org.apache.sling.rewriter

## Interface Transformer

All Superinterfaces:
  `ContentHandler`

All Known Implementing Classes:
  `DefaultTransformer`

    public interface Transformer
    extends ContentHandler

The `Transformer` interface defines the middle of a rewriter pipeline.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `dispose()` Dispose the transformer.
`void` `init​(ProcessingContext context, ProcessingComponentConfiguration config)` Initialize this component.
`void` `setContentHandler​(ContentHandler handler)` Set the content handler the transformer should stream to.

### Methods inherited from interface org.xml.sax.ContentHandler

`characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping`

### Method Detail

#### init

    void init​(ProcessingContext context,
              ProcessingComponentConfiguration config)
       throws IOException

Initialize this component.

Parameters:
  `context` - The invocation context.
  `config` - The configuration for this component.
Throws:
  `IOException` - in case of any problems

#### setContentHandler

    void setContentHandler​(ContentHandler handler)

Set the content handler the transformer should stream to.

Parameters:
  `handler` - Another transformer or a serializer.

#### dispose

    void dispose()

Dispose the transformer. This method is always invoked by the rewriter in order to allow the transformer to release any resources etc. After this method has been called the instance is considered unusable.