org.apache.camel.processor
Class ConvertBodyProcessor
java.lang.Object
org.apache.camel.processor.ConvertBodyProcessor
- All Implemented Interfaces:
- Processor
public class ConvertBodyProcessor
- extends Object
- implements Processor
A processor which converts the payload of the input message to be of the given type
If the convertions fails an InvalidPayloadException
is thrown.
- Version:
ConvertBodyProcessor
public ConvertBodyProcessor(Class<?> type)
ConvertBodyProcessor
public ConvertBodyProcessor(Class<?> type,
String charset)
toString
public String toString()
- Overrides:
toString
in class Object
process
public void process(Exchange exchange)
throws Exception
- Description copied from interface:
Processor
- Processes the message exchange
- Specified by:
process
in interface Processor
- Parameters:
exchange
- the message exchange
- Throws:
Exception
- if an internal processing error has occurred.
getType
public Class<?> getType()
Apache CAMEL