Interface GlueSchemaRegistryDeserializer

All Known Implementing Classes:
GlueSchemaRegistryDeserializerImpl

public interface GlueSchemaRegistryDeserializer
Entry point to deserialization capabilities of Glue Schema Registry client library.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canDeserialize(byte[] data)
    Determines if the given byte array can be deserialized by Glue Schema Registry deserializer.
    byte[]
    getData(byte[] data)
    Returns plain customer data from a Glue Schema Registry encoded Byte array.
    getSchema(byte[] data)
    Returns the schema encoded in the byte array by Glue Schema Registry serializer.
    void
    Overrides the UserAgentApp name attribute at runtime.
  • Method Details

    • getData

      byte[] getData(byte[] data)
      Returns plain customer data from a Glue Schema Registry encoded Byte array. All the Schema Registry specific headers, special encodings and compressions are stripped matching what was sent during serialization.
      Parameters:
      data - byte[] Schema Registry encoded byte array.
      Returns:
      decodedData byte[] Plain byte array with no schema registry information.
    • getSchema

      Schema getSchema(byte[] data)
      Returns the schema encoded in the byte array by Glue Schema Registry serializer. The schema returned is administered by Glue Schema Registry.
      Parameters:
      data - byte[] Schema Registry encoded byte array.
      Returns:
      schema Schema A Schema object representing the schema information.
    • canDeserialize

      boolean canDeserialize(byte[] data)
      Determines if the given byte array can be deserialized by Glue Schema Registry deserializer.
      Parameters:
      data - byte[] of data.
      Returns:
      true if deserializer can decode the message, false otherwise.
    • overrideUserAgentApp

      void overrideUserAgentApp(String name)
      Overrides the UserAgentApp name attribute at runtime. This can be used to set the `app` attribute in User-Agent of the de-serializer. This method overrides the User-Agent `app` attribute set using GlueSchemaRegistryConfiguration.
      Parameters:
      name - AppName