Package io.micronaut.gcp.pubsub.serdes
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
All Methods Instance Methods Abstract 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()
-
-
-
Method Detail
-
deserialize
java.lang.Object deserialize(byte[] data, io.micronaut.core.type.Argument<?> type)
Deserializes data into a target type.- Parameters:
data
- byte data to deserializetype
- target type- Returns:
- the deserialized java type
-
serialize
byte[] serialize(java.lang.Object data)
Serializes the message.- Parameters:
data
- data to serialize- Returns:
- byte array of serialized data
-
supportedType
java.lang.String supportedType()
- Returns:
- The supported mime type this SerDes is capable of hanlding
-
-