Interface PubSubMessageSerDes

All Known Implementing Classes:
JsonPubSubMessageSerDes

public interface PubSubMessageSerDes
Responsible for converstion to/from bytes into domain logic. SerDes are selected based on the MimeType they support.
Since:
2.0.0
Author:
Vinicius Carvalho
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(byte[] data, io.micronaut.core.type.Argument<?> type)
    Deserializes data into a target type.
    byte[]
    Serializes the message.
     
  • Method Details

    • deserialize

      Object deserialize(byte[] data, io.micronaut.core.type.Argument<?> type)
      Deserializes data into a target type.
      Parameters:
      data - byte data to deserialize
      type - target type
      Returns:
      the deserialized java type
    • serialize

      byte[] serialize(Object data)
      Serializes the message.
      Parameters:
      data - data to serialize
      Returns:
      byte array of serialized data
    • supportedType

      String supportedType()
      Returns:
      The supported mime type this SerDes is capable of hanlding