org.apache.camel.converter.jaxb
Class FallbackTypeConverter

java.lang.Object
  extended by org.apache.camel.converter.jaxb.FallbackTypeConverter
All Implemented Interfaces:
org.apache.camel.spi.TypeConverterAware, org.apache.camel.TypeConverter

public class FallbackTypeConverter
extends Object
implements org.apache.camel.TypeConverter, org.apache.camel.spi.TypeConverterAware

Version:

Constructor Summary
FallbackTypeConverter()
           
 
Method Summary
<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
<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)
           
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FallbackTypeConverter

public FallbackTypeConverter()
Method Detail

isPrettyPrint

public boolean isPrettyPrint()

setPrettyPrint

public void setPrettyPrint(boolean prettyPrint)

setTypeConverter

public void setTypeConverter(org.apache.camel.TypeConverter parentTypeConverter)
Specified by:
setTypeConverter in interface org.apache.camel.spi.TypeConverterAware

convertTo

public <T> T convertTo(Class<T> type,
                       Object value)
Specified by:
convertTo in interface org.apache.camel.TypeConverter

convertTo

public <T> T convertTo(Class<T> type,
                       org.apache.camel.Exchange exchange,
                       Object value)
Specified by:
convertTo in interface org.apache.camel.TypeConverter

mandatoryConvertTo

public <T> T mandatoryConvertTo(Class<T> type,
                                Object value)
                     throws org.apache.camel.NoTypeConversionAvailableException
Specified by:
mandatoryConvertTo in interface org.apache.camel.TypeConverter
Throws:
org.apache.camel.NoTypeConversionAvailableException

mandatoryConvertTo

public <T> T mandatoryConvertTo(Class<T> type,
                                org.apache.camel.Exchange exchange,
                                Object value)
                     throws org.apache.camel.NoTypeConversionAvailableException
Specified by:
mandatoryConvertTo in interface org.apache.camel.TypeConverter
Throws:
org.apache.camel.NoTypeConversionAvailableException

isJaxbType

protected <T> boolean isJaxbType(Class<T> type)

unmarshall

protected <T> T unmarshall(Class<T> type,
                           org.apache.camel.Exchange exchange,
                           Object value)
                throws Exception
Lets try parse via JAXB

Throws:
Exception

marshall

protected <T> T marshall(Class<T> type,
                         org.apache.camel.Exchange exchange,
                         Object value)
              throws JAXBException,
                     XMLStreamException,
                     FactoryConfigurationError
Throws:
JAXBException
XMLStreamException
FactoryConfigurationError

unmarshal

protected Object unmarshal(Unmarshaller unmarshaller,
                           org.apache.camel.Exchange exchange,
                           Object value)
                    throws JAXBException,
                           UnsupportedEncodingException
Throws:
JAXBException
UnsupportedEncodingException

needFiltering

protected boolean needFiltering(org.apache.camel.Exchange exchange)

createContext

protected <T> JAXBContext createContext(Class<T> type)
                             throws JAXBException
Throws:
JAXBException


Apache CAMEL