Class ProtobufSchema<T>

java.lang.Object
org.apache.pulsar.client.impl.schema.AbstractSchema<T>
org.apache.pulsar.client.impl.schema.AbstractStructSchema<T>
io.micronaut.pulsar.schemas.protobuf.ProtobufSchema<T>
Type Parameters:
T - POJO type to send and receive via Pulsar.
All Implemented Interfaces:
Cloneable, org.apache.pulsar.client.api.Schema<T>

public final class ProtobufSchema<T> extends org.apache.pulsar.client.impl.schema.AbstractStructSchema<T>
JSON Schema to allow using ProtobufferCodec from Micronaut.
Since:
1.0
Author:
Haris Secic
  • Field Summary

    Fields inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema

    LOG, reader, schemaInfo, schemaInfoProvider, writer

    Fields inherited from interface org.apache.pulsar.client.api.Schema

    BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProtobufSchema(org.apache.pulsar.common.schema.SchemaInfo schemaInfo, ProtobufReader<T> reader, ProtobufWriter<T> writer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> ProtobufSchema<T>
    of(Class<T> type, io.micronaut.protobuf.codec.ProtobufferCodec codec)
     

    Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema

    atSchemaVersion, decode, decode, decode, decode, decode, decode, encode, getReader, getSchemaInfo, setReader, setSchemaInfoProvider, setWriter

    Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema

    clone

    Methods inherited from class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.pulsar.client.api.Schema

    closeAsync, configureSchemaInfo, decode, decode, encode, getNativeSchema, requireFetchingSchemaInfo, supportSchemaVersioning, validate
  • Constructor Details

  • Method Details

    • of

      public static <T> ProtobufSchema<T> of(Class<T> type, io.micronaut.protobuf.codec.ProtobufferCodec codec)