public abstract class AbstractCastorDataFormat
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.CamelContextAware
DataFormat)
interface which leverage the Castor library for XML marshaling and
unmarshaling| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ENCODING
The default encoding used for stream access.
|
| Constructor and Description |
|---|
AbstractCastorDataFormat() |
AbstractCastorDataFormat(org.exolab.castor.xml.XMLContext xmlContext) |
| Modifier and Type | Method and Description |
|---|---|
org.exolab.castor.xml.Marshaller |
createMarshaller(org.apache.camel.Exchange exchange) |
org.exolab.castor.xml.Unmarshaller |
createUnmarshaller(org.apache.camel.Exchange exchange) |
protected org.exolab.castor.xml.XMLContext |
createXMLContext(org.apache.camel.spi.ClassResolver resolver,
ClassLoader contextClassLoader) |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
String[] |
getClassNames() |
String |
getEncoding() |
String |
getMappingFile() |
String[] |
getPackages() |
boolean |
isValidation() |
void |
marshal(org.apache.camel.Exchange exchange,
Object body,
OutputStream outputStream) |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setClassNames(String[] classNames) |
void |
setEncoding(String encoding) |
void |
setMappingFile(String mappingFile) |
void |
setPackages(String[] packages) |
void |
setValidation(boolean validation) |
void |
setXmlContext(org.exolab.castor.xml.XMLContext xmlContext) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream inputStream) |
public static final String DEFAULT_ENCODING
public AbstractCastorDataFormat()
public AbstractCastorDataFormat(org.exolab.castor.xml.XMLContext xmlContext)
public void marshal(org.apache.camel.Exchange exchange,
Object body,
OutputStream outputStream)
throws Exception
marshal in interface org.apache.camel.spi.DataFormatExceptionpublic Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream) throws Exception
unmarshal in interface org.apache.camel.spi.DataFormatExceptionprotected org.exolab.castor.xml.XMLContext createXMLContext(org.apache.camel.spi.ClassResolver resolver,
ClassLoader contextClassLoader)
throws Exception
Exceptionpublic org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic org.exolab.castor.xml.Unmarshaller createUnmarshaller(org.apache.camel.Exchange exchange)
throws Exception
Exceptionpublic org.exolab.castor.xml.Marshaller createMarshaller(org.apache.camel.Exchange exchange)
throws Exception
Exceptionpublic void setXmlContext(org.exolab.castor.xml.XMLContext xmlContext)
public String getMappingFile()
public void setMappingFile(String mappingFile)
public String[] getClassNames()
public void setClassNames(String[] classNames)
public String[] getPackages()
public void setPackages(String[] packages)
public String getEncoding()
public void setEncoding(String encoding)
public boolean isValidation()
public void setValidation(boolean validation)
protected void doStart()
throws Exception
doStart in class org.apache.camel.support.ServiceSupportExceptionApache Camel