public class ThriftDataFormat
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.spi.DataFormatName, org.apache.camel.CamelContextAware
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE_FORMAT_BINARY |
static String |
CONTENT_TYPE_FORMAT_JSON |
static String |
CONTENT_TYPE_FORMAT_SIMPLE_JSON |
Constructor and Description |
---|
ThriftDataFormat() |
ThriftDataFormat(org.apache.thrift.TBase defaultInstance) |
ThriftDataFormat(org.apache.thrift.TBase defaultInstance,
String contentTypeFormat) |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
String |
getDataFormatName() |
boolean |
isContentTypeHeader() |
protected org.apache.thrift.TBase |
loadDefaultInstance(String className,
org.apache.camel.CamelContext context) |
void |
marshal(org.apache.camel.Exchange exchange,
Object graph,
OutputStream outputStream) |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setContentTypeFormat(String contentTypeFormat) |
void |
setContentTypeHeader(boolean contentTypeHeader) |
void |
setDefaultInstance(Object instance) |
void |
setDefaultInstance(org.apache.thrift.TBase instance) |
void |
setInstanceClass(String className) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream inputStream) |
public static final String CONTENT_TYPE_FORMAT_BINARY
public static final String CONTENT_TYPE_FORMAT_JSON
public static final String CONTENT_TYPE_FORMAT_SIMPLE_JSON
public ThriftDataFormat()
public ThriftDataFormat(org.apache.thrift.TBase defaultInstance)
public ThriftDataFormat(org.apache.thrift.TBase defaultInstance, String contentTypeFormat)
public String getDataFormatName()
getDataFormatName
in interface org.apache.camel.spi.DataFormatName
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
public void setDefaultInstance(org.apache.thrift.TBase instance)
public void setDefaultInstance(Object instance)
public void setContentTypeHeader(boolean contentTypeHeader)
public boolean isContentTypeHeader()
public void setContentTypeFormat(String contentTypeFormat)
public void marshal(org.apache.camel.Exchange exchange, Object graph, OutputStream outputStream) throws Exception
marshal
in interface org.apache.camel.spi.DataFormat
Exception
public Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream) throws Exception
unmarshal
in interface org.apache.camel.spi.DataFormat
Exception
protected org.apache.thrift.TBase loadDefaultInstance(String className, org.apache.camel.CamelContext context) throws org.apache.camel.CamelException, ClassNotFoundException
org.apache.camel.CamelException
ClassNotFoundException
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
Apache Camel