Class JacksonProtobufDataFormat
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.jackson.AbstractJacksonDataFormat
org.apache.camel.component.jackson.protobuf.JacksonProtobufDataFormat
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.DataFormat,org.apache.camel.spi.DataFormatContentTypeHeader,org.apache.camel.spi.DataFormatName,org.apache.camel.spi.HasCamelContext,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@Dataformat("protobufJackson")
@Metadata(firstVersion="3.10.0",
title="Protobuf Jackson",
excludeProperties="library,instanceClass,contentTypeFormat,defaultInstance")
public class JacksonProtobufDataFormat
extends org.apache.camel.component.jackson.AbstractJacksonDataFormat
Marshal POJOs to Protobuf and back using Jackson.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionUse the default JacksonProtobufMapperandObjectJacksonProtobufDataFormat(com.fasterxml.jackson.dataformat.protobuf.ProtobufMapper mapper, Class<?> unmarshalType) Use a custom JacksonProtobufMapperand and unmarshal typeJacksonProtobufDataFormat(com.fasterxml.jackson.dataformat.protobuf.ProtobufMapper mapper, Class<?> unmarshalType, Class<?> jsonView) Use a custom JacksonProtobufMapper, unmarshal type and JSON viewJacksonProtobufDataFormat(Class<?> unmarshalType) Use the default JacksonProtobufMapperand with a custom unmarshal typeJacksonProtobufDataFormat(Class<?> unmarshalType, Class<?> jsonView) Use the default JacksonProtobufMapperand with a custom unmarshal type and JSON view -
Method Summary
Methods inherited from class org.apache.camel.component.jackson.AbstractJacksonDataFormat
addModule, disableFeature, disableFeature, disableFeature, doInit, doStart, doStop, enableFeature, enableFeature, enableFeature, getCamelContext, getCollectionType, getCollectionTypeName, getDisableFeatures, getEnableFeatures, getInclude, getJsonView, getJsonViewTypeName, getModuleClassNames, getModuleRefs, getModules, getNamingStrategy, getObjectMapper, getSchemaResolver, getTimezone, getUnmarshalType, getUnmarshalTypeName, isAllowJmsType, isAllowUnmarshallType, isAutoDiscoverObjectMapper, isAutoDiscoverSchemaResolver, isCombineUnicodeSurrogates, isContentTypeHeader, isEnableJacksonTypeConverter, isPrettyPrint, isUseDefaultObjectMapper, isUseList, marshal, setAllowJmsType, setAllowUnmarshallType, setAutoDiscoverObjectMapper, setAutoDiscoverSchemaResolver, setCamelContext, setCollectionType, setCollectionTypeName, setCombineUnicodeSurrogates, setContentTypeHeader, setDisableFeatures, setEnableFeatures, setEnableJacksonTypeConverter, setInclude, setJsonView, setJsonViewTypeName, setModuleClassNames, setModuleRefs, setModules, setNamingStrategy, setObjectMapper, setPrettyPrint, setSchemaResolver, setTimezone, setUnmarshalType, setUnmarshalTypeName, setUseDefaultObjectMapper, setUseList, unmarshal, unmarshal, useList, useMapMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
JacksonProtobufDataFormat
public JacksonProtobufDataFormat()Use the default JacksonProtobufMapperandObject -
JacksonProtobufDataFormat
Use the default JacksonProtobufMapperand with a custom unmarshal type- Parameters:
unmarshalType- the custom unmarshal type
-
JacksonProtobufDataFormat
Use the default JacksonProtobufMapperand with a custom unmarshal type and JSON view- Parameters:
unmarshalType- the custom unmarshal typejsonView- marker class to specify properties to be included during marshalling. See also
-
JacksonProtobufDataFormat
public JacksonProtobufDataFormat(com.fasterxml.jackson.dataformat.protobuf.ProtobufMapper mapper, Class<?> unmarshalType) Use a custom JacksonProtobufMapperand and unmarshal type- Parameters:
mapper- the custom mapperunmarshalType- the custom unmarshal type
-
JacksonProtobufDataFormat
public JacksonProtobufDataFormat(com.fasterxml.jackson.dataformat.protobuf.ProtobufMapper mapper, Class<?> unmarshalType, Class<?> jsonView) Use a custom JacksonProtobufMapper, unmarshal type and JSON view- Parameters:
mapper- the custom mapperunmarshalType- the custom unmarshal typejsonView- marker class to specify properties to be included during marshalling. See also
-
-
Method Details
-
getDataFormatName
- Specified by:
getDataFormatNamein interfaceorg.apache.camel.spi.DataFormatName- Specified by:
getDataFormatNamein classorg.apache.camel.component.jackson.AbstractJacksonDataFormat
-
getDefaultContentType
- Specified by:
getDefaultContentTypein classorg.apache.camel.component.jackson.AbstractJacksonDataFormat
-
createNewObjectMapper
protected com.fasterxml.jackson.dataformat.protobuf.ProtobufMapper createNewObjectMapper()- Specified by:
createNewObjectMapperin classorg.apache.camel.component.jackson.AbstractJacksonDataFormat
-
getObjectMapperClass
- Specified by:
getObjectMapperClassin classorg.apache.camel.component.jackson.AbstractJacksonDataFormat
-