public interface Transformer extends BaseTransformer
Transformer
can be chained together to covert message payloads
from one object type to another.PHASE_NAME
Modifier and Type | Method and Description |
---|---|
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
|
getEndpoint, setEndpoint
initialise
getName, setName
boolean isSourceTypeSupported(Class aClass)
aClass
- The class to check for compatabilityList getSourceTypes()
boolean isAcceptNull()
boolean isIgnoreBadInput()
Object transform(Object src) throws TransformerException
src
- the data to transformTransformerException
- if a error occurs transforming the data or if the
expected returnClass isn't the same as the transformed datavoid setReturnClass(Class theClass)
TransformerException
will be
thrown.theClass
- the expected return type classClass getReturnClass()
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.