public class JAXBTransformerResolver extends Object implements TransformerResolver, MuleContextAware, Disposable
TransformerResolver implementation used to discover whether the current transform
requests requires JAXB. The resolver will scan the source and return type for JAXB 2 annotations and will configure
a JAXB transformer accordingly. The transformer is cached and will be used for any subsequent requests.
The JAXBContext instance needed for the transform can be discovered from the registry, this means one can be
pre-configured in Spring or Guice. If there is no pre-configured JAXBContext one will be created with the
annotated JAXB class. This context will cached with the transformer.TransformerResolver.RegistryAction| Modifier and Type | Field and Description |
|---|---|
static String[] |
ignoredPackages |
protected org.apache.commons.logging.Log |
logger
logger used by this class
|
PHASE_NAME| Constructor and Description |
|---|
JAXBTransformerResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
protected JAXBContextResolver |
getContextResolver() |
protected boolean |
hasJaxbAnnotations(Class annotatedType) |
Transformer |
resolve(DataType source,
DataType result) |
void |
setMuleContext(MuleContext context) |
void |
transformerChange(Transformer transformer,
TransformerResolver.RegistryAction registryAction) |
public static final String[] ignoredPackages
protected final transient org.apache.commons.logging.Log logger
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic Transformer resolve(DataType source, DataType result) throws ResolverException
resolve in interface TransformerResolverResolverExceptionpublic void transformerChange(Transformer transformer, TransformerResolver.RegistryAction registryAction)
transformerChange in interface TransformerResolverpublic void dispose()
dispose in interface Disposableprotected JAXBContextResolver getContextResolver() throws RegistrationException
RegistrationExceptionprotected boolean hasJaxbAnnotations(Class annotatedType)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.