Class ProtobufReader<T>

java.lang.Object
io.micronaut.pulsar.schemas.protobuf.ProtobufReader<T>
Type Parameters:
T - POJO type to process.
All Implemented Interfaces:
org.apache.pulsar.client.api.schema.SchemaReader<T>

public class ProtobufReader<T> extends Object implements org.apache.pulsar.client.api.schema.SchemaReader<T>
Protobuf Schema Reader to allow using ProtobufferCodec from Micronaut.
Since:
1.1.0
Author:
Haris Secic
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProtobufReader(io.micronaut.protobuf.codec.ProtobufferCodec codec, io.micronaut.core.type.Argument<T> type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    read(byte[] bytes, int offset, int length)
     
    read(InputStream inputStream)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.pulsar.client.api.schema.SchemaReader

    getNativeSchema, read, read, read, setSchemaInfoProvider
  • Constructor Details

    • ProtobufReader

      public ProtobufReader(io.micronaut.protobuf.codec.ProtobufferCodec codec, io.micronaut.core.type.Argument<T> type)
  • Method Details

    • read

      public T read(byte[] bytes, int offset, int length)
      Specified by:
      read in interface org.apache.pulsar.client.api.schema.SchemaReader<T>
    • read

      public T read(InputStream inputStream)
      Specified by:
      read in interface org.apache.pulsar.client.api.schema.SchemaReader<T>