Mule : Transformers
This page last changed on Oct 11, 2006 by jesper.
Transformers are used to convert inbound data to an object type required by the UMO Component or outbound to an object type required by the transport such as a JmsMessage. Transformers can be configured on Endpoints that receive data to ensure that the expected object type is always received by an UMO Component. Transformers configured on an Outbound endpoint ensure that the endpoint receives the the correct object type before dispatching the event. Multiple transformers can be chained together to allow for finer grained transformer implementations that are easier to reuse. To configure an Endpoint to use more than one transformer, just specify a space separated list of transformers in the config file (see the configuration guide) or programmatically chain the transformers together using the setTransformer() method on the transformer.
And an outbound transformer might look like -
All Mule transformers must implement org.mule.transformer.UMOTransformer. There is an abstract transformer implementation that defines methods for controlling the object types this transformer supports and validates the expected return type, leaving the developer to implement a single transform() method. Standard TransformersBelow are a list of standard transformers for Mule. Individual transports may also have their own transformer types and these will be documented in the Transports Guide. XmlThese transformers can be found in the org.mule.transformers.xml package. XmlToObject <-> ObjectToXml XSLT DomToXml <-> XmlToDom JXPath Scripting EncryptionThese transformers can be found in the org.mule.transformers.encryption package. Encryption <-> Decryption CompressionThese transformers can be found in the org.mule.transformers.compression package and do not require any special configuration. GZipCompress <-> GZipUncompress EncodingThese transformers can be found in the org.mule.transformers.codec package and do not require any special configuration. SGMLEntityEncoder <-> SGMLEntityDecoder Base64Encoder <-> Base64Decoder UUEncoder <-> UUDecoder UCEncoder <-> UCDecoder ObjectThese transformers can be found in the org.mule.transformers.simple package and do not require any special configuration. ByteArrayToSerializable <-> SerializableToByteArray StringToByteArray <-> ByteArrayToString |
Document generated by Confluence on Nov 27, 2006 10:27 |