Class JavaMessageSerDes

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object deserialize​(byte[] data, io.micronaut.core.type.Argument<?> type)
      Deserializes data into a target type.
      byte[] serialize​(java.lang.Object data)
      Serializes the message.
      java.lang.String supportedType()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaMessageSerDes

        public JavaMessageSerDes()
    • Method Detail

      • supportedType

        public java.lang.String supportedType()
        Specified by:
        supportedType in interface PubSubMessageSerDes
        Returns:
        The supported mime type this SerDes is capable of hanlding
      • deserialize

        public java.lang.Object deserialize​(byte[] data,
                                            io.micronaut.core.type.Argument<?> type)
        Description copied from interface: PubSubMessageSerDes
        Deserializes data into a target type.
        Specified by:
        deserialize in interface PubSubMessageSerDes
        Parameters:
        data - byte data to deserialize
        type - target type
        Returns:
        the deserialized java type
      • serialize

        public byte[] serialize​(java.lang.Object data)
        Description copied from interface: PubSubMessageSerDes
        Serializes the message.
        Specified by:
        serialize in interface PubSubMessageSerDes
        Parameters:
        data - data to serialize
        Returns:
        byte array of serialized data