Class ProtobufSchemaResolver
java.lang.Object
org.apache.camel.component.jackson.protobuf.transform.ProtobufSchemaResolver
- All Implemented Interfaces:
org.apache.camel.component.jackson.SchemaResolver,org.apache.camel.Processor
public class ProtobufSchemaResolver
extends Object
implements org.apache.camel.component.jackson.SchemaResolver, org.apache.camel.Processor
Schema resolver able to read Protobuf schema from given exchange being processed. First attempt is to retrieve the
Protobuf schema reference from exchange properties. Second approach is to convert a given Json schema to a proper
Protobuf schema also reading from the exchange properties. Last approach it to load the Protobuf schema as a
classpath resource. The following resource path is used to resolve the schema
classpath:schemas/asvc/<T>.asvc
where T represents the content class name of the exchange body. The content class information is either set as an
explicit exchange property or it gets resolved from exchange body type information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(org.apache.camel.Exchange exchange) com.fasterxml.jackson.core.FormatSchemaresolve(org.apache.camel.Exchange exchange) voidsetContentClass(String contentClass) void
-
Constructor Details
-
ProtobufSchemaResolver
public ProtobufSchemaResolver()
-
-
Method Details
-
getSchema
-
setSchema
-
getContentClass
-
setContentClass
-
process
- Specified by:
processin interfaceorg.apache.camel.Processor- Throws:
Exception
-
resolve
public com.fasterxml.jackson.core.FormatSchema resolve(org.apache.camel.Exchange exchange) - Specified by:
resolvein interfaceorg.apache.camel.component.jackson.SchemaResolver
-