public class JAXBMarshallerTransformer extends AbstractTransformer
JAXBContext
is set on the transformer, but
the 'sourceClass' is set, a JAXBContext
will be created using the sourceClass.Modifier and Type | Field and Description |
---|---|
protected JAXBContext |
jaxbContext |
protected Class<?> |
sourceClass |
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
JAXBMarshallerTransformer() |
JAXBMarshallerTransformer(JAXBContext jaxbContext,
DataType returnType) |
Modifier and Type | Method and Description |
---|---|
protected Object |
doTransform(Object src,
String encoding) |
JAXBContext |
getJaxbContext() |
Class<?> |
getSourceClass() |
void |
initialise()
Template method where deriving classes can do any initialisation after the
properties have been set on this transformer
|
void |
setJaxbContext(JAXBContext jaxbContext) |
void |
setSourceClass(Class<?> sourceClass) |
dispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType
getAnnotation, getAnnotations, setAnnotations
protected JAXBContext jaxbContext
protected Class<?> sourceClass
public JAXBMarshallerTransformer()
public JAXBMarshallerTransformer(JAXBContext jaxbContext, DataType returnType)
public void initialise() throws InitialisationException
AbstractTransformer
initialise
in interface Initialisable
initialise
in class AbstractTransformer
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered fromprotected Object doTransform(Object src, String encoding) throws TransformerException
doTransform
in class AbstractTransformer
TransformerException
public JAXBContext getJaxbContext()
public void setJaxbContext(JAXBContext jaxbContext)
public Class<?> getSourceClass()
public void setSourceClass(Class<?> sourceClass)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.