public class FallbackTypeConverter
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.TypeConverter, org.apache.camel.spi.TypeConverterAware
| Modifier and Type | Field and Description |
|---|---|
static String |
PRETTY_PRINT |
| Constructor and Description |
|---|
FallbackTypeConverter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowNull() |
<T> T |
convertTo(Class<T> type,
org.apache.camel.Exchange exchange,
Object value) |
<T> T |
convertTo(Class<T> type,
Object value) |
protected <T> JAXBContext |
createContext(Class<T> type) |
protected void |
doStart() |
protected void |
doStop() |
protected <T> Unmarshaller |
getUnmarshaller(Class<T> type) |
protected <T> boolean |
isJaxbType(Class<T> type) |
boolean |
isPrettyPrint() |
<T> T |
mandatoryConvertTo(Class<T> type,
org.apache.camel.Exchange exchange,
Object value) |
<T> T |
mandatoryConvertTo(Class<T> type,
Object value) |
protected <T> T |
marshall(Class<T> type,
org.apache.camel.Exchange exchange,
Object value) |
protected boolean |
needFiltering(org.apache.camel.Exchange exchange) |
void |
setPrettyPrint(boolean prettyPrint) |
void |
setTypeConverter(org.apache.camel.TypeConverter parentTypeConverter) |
<T> T |
tryConvertTo(Class<T> type,
org.apache.camel.Exchange exchange,
Object value) |
<T> T |
tryConvertTo(Class<T> type,
Object value) |
protected Object |
unmarshal(Unmarshaller unmarshaller,
org.apache.camel.Exchange exchange,
Object value) |
protected <T> T |
unmarshall(Class<T> type,
org.apache.camel.Exchange exchange,
Object value)
Lets try parse via JAXB
|
public static final String PRETTY_PRINT
public boolean isPrettyPrint()
public void setPrettyPrint(boolean prettyPrint)
public boolean allowNull()
allowNull in interface org.apache.camel.TypeConverterpublic void setTypeConverter(org.apache.camel.TypeConverter parentTypeConverter)
setTypeConverter in interface org.apache.camel.spi.TypeConverterAwarepublic <T> T convertTo(Class<T> type, Object value)
convertTo in interface org.apache.camel.TypeConverterpublic <T> T convertTo(Class<T> type, org.apache.camel.Exchange exchange, Object value)
convertTo in interface org.apache.camel.TypeConverterpublic <T> T mandatoryConvertTo(Class<T> type, Object value) throws org.apache.camel.NoTypeConversionAvailableException
mandatoryConvertTo in interface org.apache.camel.TypeConverterorg.apache.camel.NoTypeConversionAvailableExceptionpublic <T> T mandatoryConvertTo(Class<T> type, org.apache.camel.Exchange exchange, Object value) throws org.apache.camel.NoTypeConversionAvailableException
mandatoryConvertTo in interface org.apache.camel.TypeConverterorg.apache.camel.NoTypeConversionAvailableExceptionpublic <T> T tryConvertTo(Class<T> type, Object value)
tryConvertTo in interface org.apache.camel.TypeConverterpublic <T> T tryConvertTo(Class<T> type, org.apache.camel.Exchange exchange, Object value)
tryConvertTo in interface org.apache.camel.TypeConverterprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.ServiceSupportExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.ServiceSupportExceptionprotected <T> boolean isJaxbType(Class<T> type)
protected <T> T unmarshall(Class<T> type, org.apache.camel.Exchange exchange, Object value) throws Exception
Exceptionprotected <T> T marshall(Class<T> type, org.apache.camel.Exchange exchange, Object value) throws JAXBException, XMLStreamException, FactoryConfigurationError, org.apache.camel.TypeConversionException
JAXBExceptionXMLStreamExceptionFactoryConfigurationErrororg.apache.camel.TypeConversionExceptionprotected Object unmarshal(Unmarshaller unmarshaller, org.apache.camel.Exchange exchange, Object value) throws JAXBException, UnsupportedEncodingException, XMLStreamException
protected boolean needFiltering(org.apache.camel.Exchange exchange)
protected <T> JAXBContext createContext(Class<T> type) throws JAXBException
JAXBExceptionprotected <T> Unmarshaller getUnmarshaller(Class<T> type) throws JAXBException
JAXBExceptionApache Camel