Class CBORDataFormat
- java.lang.Object
-
- org.apache.camel.model.IdentifiedType
-
- org.apache.camel.model.DataFormatDefinition
-
- org.apache.camel.model.dataformat.CBORDataFormat
-
@Metadata(firstVersion="3.0.0", label="dataformat,transformation,json", title="CBOR") public class CBORDataFormat extends DataFormatDefinitionUnmarshal a CBOR payload to POJO and back.
-
-
Constructor Summary
Constructors Constructor Description CBORDataFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAllowJmsType()StringgetAllowUnmarshallType()Class<?>getCollectionType()StringgetCollectionTypeName()StringgetDisableFeatures()StringgetEnableFeatures()StringgetObjectMapper()StringgetPrettyPrint()Class<?>getUnmarshalType()StringgetUnmarshalTypeName()StringgetUseDefaultObjectMapper()StringgetUseList()voidsetAllowJmsType(String allowJmsType)Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.voidsetAllowUnmarshallType(String allowUnmarshallType)If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling.voidsetCollectionType(Class<?> collectionType)voidsetCollectionTypeName(String collectionTypeName)Refers to a custom collection type to lookup in the registry to use.voidsetDisableFeatures(String disableFeatures)Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.voidsetEnableFeatures(String enableFeatures)Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.voidsetObjectMapper(String objectMapper)Lookup and use the existing CBOR ObjectMapper with the given id when using Jackson.voidsetPrettyPrint(String prettyPrint)To enable pretty printing output nicely formatted.voidsetUnmarshalType(Class<?> unmarshalType)Class of the java type to use when unmarshallingvoidsetUnmarshalTypeName(String unmarshalTypeName)Class name of the java type to use when unmarshallingvoidsetUseDefaultObjectMapper(String useDefaultObjectMapper)Whether to lookup and use default Jackson CBOR ObjectMapper from the registry.voidsetUseList(String useList)To unmarshal to a List of Map or a List of Pojo.-
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
-
getObjectMapper
public String getObjectMapper()
-
setObjectMapper
public void setObjectMapper(String objectMapper)
Lookup and use the existing CBOR ObjectMapper with the given id when using Jackson.
-
getUseDefaultObjectMapper
public String getUseDefaultObjectMapper()
-
setUseDefaultObjectMapper
public void setUseDefaultObjectMapper(String useDefaultObjectMapper)
Whether to lookup and use default Jackson CBOR ObjectMapper from the registry.
-
getUnmarshalTypeName
public String getUnmarshalTypeName()
-
setUnmarshalTypeName
public void setUnmarshalTypeName(String unmarshalTypeName)
Class name of the java type to use when unmarshalling
-
getUnmarshalType
public Class<?> getUnmarshalType()
-
getPrettyPrint
public String getPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(String prettyPrint)
To enable pretty printing output nicely formatted. Is by default false.
-
getAllowJmsType
public String getAllowJmsType()
-
setAllowJmsType
public void setAllowJmsType(String allowJmsType)
Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.
-
setUnmarshalType
public void setUnmarshalType(Class<?> unmarshalType)
Class of the java type to use when unmarshalling
-
getCollectionTypeName
public String getCollectionTypeName()
-
setCollectionTypeName
public void setCollectionTypeName(String collectionTypeName)
Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default.
-
getCollectionType
public Class<?> getCollectionType()
-
setCollectionType
public void setCollectionType(Class<?> collectionType)
-
getUseList
public String getUseList()
-
setUseList
public void setUseList(String useList)
To unmarshal to a List of Map or a List of Pojo.
-
getAllowUnmarshallType
public String getAllowUnmarshallType()
-
setAllowUnmarshallType
public void setAllowUnmarshallType(String allowUnmarshallType)
If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
-
getEnableFeatures
public String getEnableFeatures()
-
setEnableFeatures
public void setEnableFeatures(String enableFeatures)
Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
-
getDisableFeatures
public String getDisableFeatures()
-
setDisableFeatures
public void setDisableFeatures(String disableFeatures)
Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma
-
-