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.module.xml.transformer.jaxb
Class JAXBMarshallerTransformer

    java.lang.Object
      org.mule.transformer.AbstractTransformer
          org.mule.module.xml.transformer.jaxb.JAXBMarshallerTransformer

All Implemented Interfaces:
  MuleContextAware, MuleContextNotificationListener<MuleContextNotification>, ServerNotificationListener<MuleContextNotification>, Disposable, Initialisable, NamedObject, MessageProcessor, BaseTransformer, Transformer

    public class JAXBMarshallerTransformer

extends AbstractTransformer

Allows marshaling of Java objects to XML using JAXB 2. A specific sourceClass can be set on this transformer, this is the expected source object type. If no external `JAXBContext` is set on the transformer, but the 'sourceClass' is set, a `JAXBContext` will be created using the sourceClass.

Since:
  3.0

Field Summary
`protected javax.xml.bind.JAXBContext` | `jaxbContext`
`protected Class<?>` | `sourceClass`

Fields inherited from class org.mule.transformer.AbstractTransformer
`encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes`

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

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

Constructor Summary
`JAXBMarshallerTransformer()`
`JAXBMarshallerTransformer(javax.xml.bind.JAXBContext jaxbContext, DataType returnType)`

Method Summary
`protected Object` | `doTransform(Object src, String encoding)`
`javax.xml.bind.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(javax.xml.bind.JAXBContext jaxbContext)`
`void` | `setSourceClass(Class<?> sourceClass)`

Methods inherited from class org.mule.transformer.AbstractTransformer
`checkReturnClass, dispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, onNotification, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### jaxbContext

    protected javax.xml.bind.JAXBContext jaxbContext

### sourceClass

    protected Class<?> sourceClass

Constructor Detail

### JAXBMarshallerTransformer

    public JAXBMarshallerTransformer()

### JAXBMarshallerTransformer

    public JAXBMarshallerTransformer(javax.xml.bind.JAXBContext jaxbContext,
                                     DataType returnType)

Method Detail

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from class: `AbstractTransformer`
  Template method where deriving classes can do any initialisation after the properties have been set on this transformer

  Specified by:
    `initialise` in interface `Initialisable`
  Overrides:
    `initialise` in class `AbstractTransformer`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### doTransform

    protected Object doTransform(Object src,
                                 String encoding)
                          throws TransformerException

  Specified by:
    `doTransform` in class `AbstractTransformer`
  Throws:
    `TransformerException`

### getJaxbContext

    public javax.xml.bind.JAXBContext getJaxbContext()

### setJaxbContext

    public void setJaxbContext(javax.xml.bind.JAXBContext jaxbContext)

### getSourceClass

    public Class<?> getSourceClass()

### setSourceClass

    public void setSourceClass(Class<?> sourceClass)

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-2010 MuleSoft, Inc.. All Rights Reserved.