Class ProtobufSchema<T extends com.google.protobuf.GeneratedMessageV3>
- java.lang.Object
-
- org.apache.pulsar.client.impl.schema.AbstractSchema<T>
-
- org.apache.pulsar.client.impl.schema.AbstractStructSchema<T>
-
- org.apache.pulsar.client.impl.schema.AvroBaseStructSchema<T>
-
- org.apache.pulsar.client.impl.schema.ProtobufSchema<T>
-
- All Implemented Interfaces:
java.lang.Cloneable
,org.apache.pulsar.client.api.Schema<T>
public class ProtobufSchema<T extends com.google.protobuf.GeneratedMessageV3> extends AvroBaseStructSchema<T>
A schema implementation to deal with protobuf generated messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProtobufSchema.ProtoBufParsingInfo
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PARSING_INFO_PROPERTY
-
Fields inherited from class org.apache.pulsar.client.impl.schema.AvroBaseStructSchema
schema
-
Fields inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema
LOG, reader, schemaInfo, schemaInfoProvider, writer
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends com.google.protobuf.GeneratedMessageV3>
ProtobufSchema<T>of(java.lang.Class<T> pojo)
static <T extends com.google.protobuf.GeneratedMessageV3>
ProtobufSchema<T>of(java.lang.Class pojo, java.util.Map<java.lang.String,java.lang.String> properties)
static <T> ProtobufSchema
of(org.apache.pulsar.client.api.schema.SchemaDefinition<T> schemaDefinition)
static <T> ProtobufSchema
ofGenericClass(java.lang.Class<T> pojo, java.util.Map<java.lang.String,java.lang.String> properties)
-
Methods inherited from class org.apache.pulsar.client.impl.schema.AvroBaseStructSchema
getAvroSchema, getNativeSchema
-
Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema
atSchemaVersion, decode, decode, decode, decode, encode, getReader, getSchemaInfo, setReader, setSchemaInfoProvider, setWriter
-
Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema
clone
-
-
-
-
Field Detail
-
PARSING_INFO_PROPERTY
public static final java.lang.String PARSING_INFO_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
of
public static <T extends com.google.protobuf.GeneratedMessageV3> ProtobufSchema<T> of(java.lang.Class<T> pojo)
-
ofGenericClass
public static <T> ProtobufSchema ofGenericClass(java.lang.Class<T> pojo, java.util.Map<java.lang.String,java.lang.String> properties)
-
of
public static <T> ProtobufSchema of(org.apache.pulsar.client.api.schema.SchemaDefinition<T> schemaDefinition)
-
of
public static <T extends com.google.protobuf.GeneratedMessageV3> ProtobufSchema<T> of(java.lang.Class pojo, java.util.Map<java.lang.String,java.lang.String> properties)
-
-