Class ThriftDataFormat
- java.lang.Object
-
- org.apache.camel.model.IdentifiedType
-
- org.apache.camel.model.DataFormatDefinition
-
- org.apache.camel.model.dataformat.ThriftDataFormat
-
- All Implemented Interfaces:
ContentTypeHeaderAware
@Metadata(firstVersion="2.20.0", label="dataformat,transformation", title="Thrift") public class ThriftDataFormat extends DataFormatDefinition implements ContentTypeHeaderAware
Serialize and deserialize messages using Apache Thrift binary data format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThriftDataFormat.Builder
Builder
is a specific builder forThriftDataFormat
.
-
Constructor Summary
Constructors Constructor Description ThriftDataFormat()
ThriftDataFormat(String instanceClass)
ThriftDataFormat(String instanceClass, String contentTypeFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentTypeFormat()
String
getContentTypeHeader()
Whether the data format should set the Content-Type header with the type from the data format.Object
getDefaultInstance()
String
getInstanceClass()
void
setContentTypeFormat(String contentTypeFormat)
Defines a content type format in which thrift message will be serialized/deserialized from(to) the Java been.void
setContentTypeHeader(String contentTypeHeader)
Whether the data format should set the Content-Type header with the type from the data format.void
setDefaultInstance(Object defaultInstance)
void
setInstanceClass(String instanceClass)
Name of class to use when unmarshalling-
Methods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getDataFormatName, getShortName, setDataFormat, setDataFormatName
-
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
-
-
-
Method Detail
-
getInstanceClass
public String getInstanceClass()
-
setInstanceClass
public void setInstanceClass(String instanceClass)
Name of class to use when unmarshalling
-
setContentTypeFormat
public void setContentTypeFormat(String contentTypeFormat)
Defines a content type format in which thrift message will be serialized/deserialized from(to) the Java been. The format can either be native or json for either native binary thrift, json or simple json fields representation. The default value is binary.
-
getContentTypeFormat
public String getContentTypeFormat()
-
getContentTypeHeader
public String getContentTypeHeader()
Description copied from interface:ContentTypeHeaderAware
Whether the data format should set the Content-Type header with the type from the data format. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSON etc.- Specified by:
getContentTypeHeader
in interfaceContentTypeHeaderAware
-
setContentTypeHeader
public void setContentTypeHeader(String contentTypeHeader)
Description copied from interface:ContentTypeHeaderAware
Whether the data format should set the Content-Type header with the type from the data format. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSON etc.- Specified by:
setContentTypeHeader
in interfaceContentTypeHeaderAware
-
getDefaultInstance
public Object getDefaultInstance()
-
setDefaultInstance
public void setDefaultInstance(Object defaultInstance)
-
-