![]() |
morphis | wax | ||||
![]() |
|||||
Translators: Writing Custom TranslatorsMorphis provides an interface for building custom translators. A custom translator is useful for performing stream to stream translation. For example, you may wish to parse an incoming document and perform actions on the parsed elements. Or, you can perform image resizing on the incoming stream. To create a custom Translator, you must implement the Morphis
class
The
You may also query the InputStream to see when it expires. An expired InputStream means your Translator ought not to cache its contents.
The DispatchContext provides many other useful fields, such as the Servlet's HttpServletRequest and HttpServletResponse objects, as well as objects to obtain any Translator filters which may have been defined for processing. In order to configure Morphis to use your custom Translator, you will need to define it in dispatch.xml. Translator Filters are not required, and are only necessary when creating complex translation schemes like SAX Translation.
|
|||||
![]() |