Transformer (Mule ESB 2.2.1 API)
Keywords: org.mule.api.transformer.Transformer interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.api.transformer
Interface Transformer

All Superinterfaces:
  BaseTransformer, Initialisable, NamedObject

All Known Implementing Classes:
  AbstractCompressionTransformer, AbstractDiscoverableTransformer, AbstractEncryptionTransformer, AbstractEventTransformer, AbstractExpressionTransformer, AbstractJmsTransformer, AbstractMessageAwareTransformer, AbstractTransformer, AbstractXmlTransformer, AbstractXStreamTransformer, AddBookResponse, AutoTransformer, Base64Decoder, Base64Encoder, BeanBuilderTransformer, ByteArrayToHexString, ByteArrayToMuleMessage, ByteArrayToObject, ByteArrayToSerializable, ChatStringToString, CreditProfileXmlToCreditProfile, DecryptionTransformer, DomDocumentToXml, EmailMessageToString, EncryptionTransformer, ErrorMessageToException, ErrorMessageToExceptionBean, EventObjectTransformer, ExceptionBeanToErrorMessage, ExceptionToString, ExpressionTransformer, FileToByteArray, FileToString, GetBeanProperty, GZipCompressTransformer, GZipUncompressTransformer, HexStringToByteArray, HttpClientMethodResponseToObject, HttpRequestBodyToParamMap, HttpRequestToByteArray, HttpRequestToInputStream, HttpRequestToNameString, HttpRequestToParameter, HttpRequestToParameterMap, HttpRequestToSoapRequest, HttpResponseToString, JMSMessageToObject, JXPathExtractor, LoanQuoteRequestToCreditProfileArgs, MapLookup, MessagePropertiesTransformer, MimeMessageToRfc822ByteArray, MuleMessageToByteArray, MuleMessageToHttpResponse, NameStringToChatString, NoActionTransformer, ObjectArrayToString, ObjectToByteArray, ObjectToHttpClientMethodRequest, ObjectToInputStream, ObjectToJMSMessage, ObjectToMimeMessage, ObjectToOutputHandler, ObjectToRemoteInvocationResultTransformer, ObjectToRemoteInvocationTransformer, ObjectToString, ObjectToXml, ObjectToXmppPacket, OrderToEmailTransformer, ParameterMapToBook, RestRequestToCustomerRequest, Rfc822ByteArraytoMimeMessage, ScriptTransformer, SerializableToByteArray, ServletRequestToOutputHandler, SetLendersAsRecipients, SimpleMathTransformer, StdinToNameString, StringAppendTestTransformer, StringAppendTransformer, StringToEmailMessage, StringToNameString, StringToNumber, StringToObjectArray, TransformerCollection, TransformerTemplate, XmlEntityDecoder, XmlEntityEncoder, XmlPrettyPrinter, XmlToDomDocument, XmlToObject, XmlToOutputHandler, XmlToXMLStreamReader, XmppPacketToObject, XPathExtractor, XsltTransformer

    public interface Transformer

extends BaseTransformer

`Transformer` can be chained together to covert message payloads from one object type to another.

Field Summary

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Method Summary
`Class` | `getReturnClass()`
`List` | `getSourceTypes()` Returns an unmodifiable list of Source types registered on this transformer
`boolean` | `isAcceptNull()` Does this transformer allow null input?
`boolean` | `isIgnoreBadInput()`
`boolean` | `isSourceTypeSupported(Class aClass)` Determines if a particular source class can be handled by this transformer
`void` | `setReturnClass(Class theClass)` Sets the expected return type for the transformed data.
`Object` | `transform(Object src)` Thransforms the supplied data and returns the result

Methods inherited from interface org.mule.api.transformer.BaseTransformer
`getEndpoint, setEndpoint`

Methods inherited from interface org.mule.api.lifecycle.Initialisable
`initialise`

Methods inherited from interface org.mule.api.NamedObject
`getName, setName`

Method Detail

### isSourceTypeSupported

    boolean isSourceTypeSupported(Class aClass)

  Determines if a particular source class can be handled by this transformer

  Parameters:
    `aClass` - The class to check for compatability
  Returns:
    true if the transformer supports this type of class or false otherwise

### getSourceTypes

    List getSourceTypes()

  Returns an unmodifiable list of Source types registered on this transformer

  Returns:
    an unmodifiable list of Source types registered on this transformer

### isAcceptNull

    boolean isAcceptNull()

  Does this transformer allow null input?

  Returns:
    true if this transformer can accept null input

### isIgnoreBadInput

    boolean isIgnoreBadInput()

### transform

    Object transform(Object src)
                     throws TransformerException

  Thransforms the supplied data and returns the result

  Parameters:
    `src` - the data to transform
  Returns:
    the transformed data
  Throws:
    `TransformerException` - if a error occurs transforming the data or if the expected returnClass isn't the same as the transformed data

### setReturnClass

    void setReturnClass(Class theClass)

  Sets the expected return type for the transformed data. If the transformed data is not of this class type a `TransformerException` will be thrown.

  Parameters:
    `theClass` - the expected return type class

### getReturnClass

    Class getReturnClass()

  Returns:
    the exceptedreturn type

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.