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
Modifier and TypeMethodDescriptiondeserialize
(byte[] data, io.micronaut.core.type.Argument<?> type) Deserializes data into a target type.byte[]
Serializes the message.
-
Method Details
-
deserialize
Deserializes data into a target type.- Parameters:
data
- byte data to deserializetype
- target type- Returns:
- the deserialized java type
-
serialize
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
-