Interface RestBindingJaxbDataFormatFactory
public interface RestBindingJaxbDataFormatFactory
SPI that configures a JAXB
DataFormat pair for XML binding in the Camel REST DSL.
When a REST-DSL route uses a binding mode that includes XML (e.g. RestConfiguration.RestBindingMode.xml or
RestConfiguration.RestBindingMode.json_xml), the REST binding processor calls setupJaxb()
to obtain configured DataFormat instances for the input and output types. This interface decouples the REST
binding layer in camel-core from the camel-jaxb module: the factory is discovered via the service key
FACTORY and is only invoked when JAXB binding is actually needed, so routes that use JSON-only binding do
not require camel-jaxb on the classpath.
See Rest DSL in the Camel user manual.- Since:
- 3.2
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidsetupJaxb(CamelContext camelContext, RestConfiguration config, @Nullable String type, @Nullable Class<?> typeClass, @Nullable String outType, @Nullable Class<?> outTypeClass, DataFormat jaxb, DataFormat outJaxb) Setup XML data format
-
Field Details
-
FACTORY
-
-
Method Details
-
setupJaxb
void setupJaxb(CamelContext camelContext, RestConfiguration config, @Nullable String type, @Nullable Class<?> typeClass, @Nullable String outType, @Nullable Class<?> outTypeClass, DataFormat jaxb, DataFormat outJaxb) throws Exception Setup XML data format- Throws:
Exception
-