Class ProtobufDataFormat.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • contentTypeFormat

        public ProtobufDataFormat.Builder contentTypeFormat​(String contentTypeFormat)
        Defines a content type format in which protobuf message will be serialized/deserialized from(to) the Java been. The format can either be native or json for either native protobuf or json fields representation. The default value is native.
      • objectMapper

        public ProtobufDataFormat.Builder objectMapper​(String objectMapper)
        Lookup and use the existing ObjectMapper with the given id when using Jackson.
      • useDefaultObjectMapper

        public ProtobufDataFormat.Builder useDefaultObjectMapper​(String useDefaultObjectMapper)
        Whether to lookup and use default Jackson ObjectMapper from the registry.
      • useDefaultObjectMapper

        public ProtobufDataFormat.Builder useDefaultObjectMapper​(boolean useDefaultObjectMapper)
        Whether to lookup and use default Jackson ObjectMapper from the registry.
      • jsonViewTypeName

        public ProtobufDataFormat.Builder jsonViewTypeName​(String jsonViewTypeName)
        When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has @JsonView annotations
      • jsonView

        public ProtobufDataFormat.Builder jsonView​(Class<?> jsonView)
        When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has @JsonView annotations
      • include

        public ProtobufDataFormat.Builder include​(String include)
        If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL
      • allowJmsType

        public ProtobufDataFormat.Builder allowJmsType​(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.
      • allowJmsType

        public ProtobufDataFormat.Builder allowJmsType​(boolean allowJmsType)
        Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to.
      • collectionTypeName

        public ProtobufDataFormat.Builder collectionTypeName​(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.
      • moduleClassNames

        public ProtobufDataFormat.Builder moduleClassNames​(String moduleClassNames)
        To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma.
      • moduleRefs

        public ProtobufDataFormat.Builder moduleRefs​(String moduleRefs)
        To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma.
      • enableFeatures

        public ProtobufDataFormat.Builder enableFeatures​(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

      • disableFeatures

        public ProtobufDataFormat.Builder disableFeatures​(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

      • allowUnmarshallType

        public ProtobufDataFormat.Builder allowUnmarshallType​(String allowUnmarshallType)
        If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.

        This should only be enabled when desired to be used.

      • allowUnmarshallType

        public ProtobufDataFormat.Builder allowUnmarshallType​(boolean allowUnmarshallType)
        If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling.

        This should only be enabled when desired to be used.

      • autoDiscoverObjectMapper

        public ProtobufDataFormat.Builder autoDiscoverObjectMapper​(String autoDiscoverObjectMapper)
        If set to true then Jackson will lookup for an objectMapper into the registry
      • autoDiscoverObjectMapper

        public ProtobufDataFormat.Builder autoDiscoverObjectMapper​(boolean autoDiscoverObjectMapper)
        If set to true then Jackson will lookup for an objectMapper into the registry
      • schemaResolver

        public ProtobufDataFormat.Builder schemaResolver​(String schemaResolver)
        Optional schema resolver used to lookup schemas for the data in transit.
      • autoDiscoverSchemaResolver

        public ProtobufDataFormat.Builder autoDiscoverSchemaResolver​(String autoDiscoverSchemaResolver)
        When not disabled, the SchemaResolver will be looked up into the registry
      • autoDiscoverSchemaResolver

        public ProtobufDataFormat.Builder autoDiscoverSchemaResolver​(boolean autoDiscoverSchemaResolver)
        When not disabled, the SchemaResolver will be looked up into the registry