org.mule.transformer
Class AbstractMessageAwareTransformer
java.lang.Object
org.mule.transformer.AbstractTransformer
org.mule.transformer.AbstractMessageAwareTransformer
- All Implemented Interfaces:
- MuleContextAware, Initialisable, NamedObject, BaseTransformer, Transformer
- Direct Known Subclasses:
- AbstractExpressionTransformer, AbstractJmsTransformer, AbstractJsonTransformer, AbstractXmlTransformer, AbstractXStreamTransformer, AutoTransformer, HttpRequestBodyToParamMap, HttpRequestToBook, HttpRequestToParameter, HttpRequestToParameterMap, HttpRequestToSoapRequest, MessagePropertiesTransformer, MuleMessageToByteArray, MuleMessageToHttpResponse, ObjectToHttpClientMethodRequest, ObjectToXmppPacket, RestRequestToCustomerRequest, ScriptTransformer, SetLendersAsRecipients, StringToEmailMessage, TransformerChain, TransformerTemplate, XmppPacketToObject
public abstract class AbstractMessageAwareTransformer
- extends AbstractTransformer
AbstractMessageAwareTransformer is a transformer that has a reference
to the current message. This message can be used obtains properties associated
with the current message useful to the transform. Note that when part of a
transform chain, the Message payload reflects the pre-transform message state,
unless there is no current event for this thread, then the message will be a new
DefaultMuleMessage with the src as its payload. Transformers should always work on the
src object not the message payload.
- See Also:
MuleMessage,
DefaultMuleMessage
| Methods inherited from class org.mule.transformer.AbstractTransformer |
checkReturnClass, generateTransformerName, getEncoding, getEndpoint, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, registerSourceType, registerSourceType, setEndpoint, setIgnoreBadInput, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType |
AbstractMessageAwareTransformer
public AbstractMessageAwareTransformer()
isSourceDataTypeSupported
public boolean isSourceDataTypeSupported(DataType dataType,
boolean exactMatch)
- Description copied from class:
AbstractTransformer
- Determines whether that data type passed in is supported by this transformer
- Overrides:
isSourceDataTypeSupported in class AbstractTransformer
- Parameters:
dataType - the type to check againstexactMatch - if set to true, this method will look for an exact match to the data type, if false it will look
for a compatible data type.
- Returns:
- true if the source type is supported by this transformer, false otherwise
doTransform
public final Object doTransform(Object src,
String encoding)
throws TransformerException
- Specified by:
doTransform in class AbstractTransformer
- Throws:
TransformerException
transform
public abstract Object transform(MuleMessage message,
String outputEncoding)
throws TransformerException
- Throws:
TransformerException
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.