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 DataFormatDefinition
Unmarshal a CBOR payload to POJO and back.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CBORDataFormat.Builder
Builder
is a specific builder forCBORDataFormat
.
-
Constructor Summary
Constructors Constructor Description CBORDataFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAllowJmsType()
String
getAllowUnmarshallType()
Class<?>
getCollectionType()
String
getCollectionTypeName()
String
getDisableFeatures()
String
getEnableFeatures()
String
getObjectMapper()
String
getPrettyPrint()
Class<?>
getUnmarshalType()
String
getUnmarshalTypeName()
String
getUseDefaultObjectMapper()
String
getUseList()
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.void
setAllowUnmarshallType(String allowUnmarshallType)
If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header during the unmarshalling.void
setCollectionType(Class<?> collectionType)
void
setCollectionTypeName(String collectionTypeName)
Refers to a custom collection type to lookup in the registry to use.void
setDisableFeatures(String disableFeatures)
Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.void
setEnableFeatures(String enableFeatures)
Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper.void
setObjectMapper(String objectMapper)
Lookup and use the existing CBOR ObjectMapper with the given id when using Jackson.void
setPrettyPrint(String prettyPrint)
To enable pretty printing output nicely formatted.void
setUnmarshalType(Class<?> unmarshalType)
Class of the java type to use when unmarshallingvoid
setUnmarshalTypeName(String unmarshalTypeName)
Class name of the java type to use when unmarshallingvoid
setUseDefaultObjectMapper(String useDefaultObjectMapper)
Whether to lookup and use default Jackson CBOR ObjectMapper from the registry.void
setUseList(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
-
-