public class BoonDataFormat
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.spi.DataFormatName, org.apache.camel.NonManagedService
Constructor and Description |
---|
BoonDataFormat() |
BoonDataFormat(Class<?> unmarshalType)
Use the default Boon
ObjectMapper and with a custom unmarshal
type |
BoonDataFormat(Class<?> unmarshalType,
org.boon.json.ObjectMapper mapper)
Use a custom unmarshal type and Boon mapper
|
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
String |
getDataFormatName() |
org.boon.json.ObjectMapper |
getObjectMapper() |
Class<?> |
getUnmarshalType() |
Boolean |
getUseList() |
void |
marshal(org.apache.camel.Exchange exchange,
Object graph,
OutputStream stream) |
void |
setUnmarshalType(Class<?> unmarshalType) |
void |
setUseList(Boolean useList) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream stream) |
void |
useList()
Uses
List when unmarshalling. |
public BoonDataFormat()
public BoonDataFormat(Class<?> unmarshalType)
ObjectMapper
and with a custom unmarshal
typeunmarshalType
- the custom unmarshal typepublic BoonDataFormat(Class<?> unmarshalType, org.boon.json.ObjectMapper mapper)
mapper
- the custom mapperunmarshalType
- the custom unmarshal typepublic String getDataFormatName()
getDataFormatName
in interface org.apache.camel.spi.DataFormatName
public void marshal(org.apache.camel.Exchange exchange, Object graph, OutputStream stream) throws Exception
marshal
in interface org.apache.camel.spi.DataFormat
Exception
public Object unmarshal(org.apache.camel.Exchange exchange, InputStream stream) throws Exception
unmarshal
in interface org.apache.camel.spi.DataFormat
Exception
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.ServiceSupport
Exception
public Class<?> getUnmarshalType()
public void setUnmarshalType(Class<?> unmarshalType)
public org.boon.json.ObjectMapper getObjectMapper()
public Boolean getUseList()
public void setUseList(Boolean useList)
public void useList()
List
when unmarshalling.Apache Camel