Package io.micronaut.gcp.pubsub.serdes
Class JsonPubSubMessageSerDes
java.lang.Object
io.micronaut.gcp.pubsub.serdes.JsonPubSubMessageSerDes
- All Implemented Interfaces:
 PubSubMessageSerDes
A 
PubSubMessageSerDes implementation that uses a JsonMapper to convert
 application/json mime types.- Since:
 - 2.0.0
 - Author:
 - Vinicius Carvalho, Dean Wette
 
- 
Constructor Summary
ConstructorsConstructorDescriptionJsonPubSubMessageSerDes(io.micronaut.json.JsonMapper jsonMapper) Default constructor. - 
Method Summary
Modifier and TypeMethodDescriptiondeserialize(byte[] data, io.micronaut.core.type.Argument<?> type) Deserializes data into a target type.byte[]Serializes the message. 
- 
Constructor Details
- 
JsonPubSubMessageSerDes
public JsonPubSubMessageSerDes(io.micronaut.json.JsonMapper jsonMapper) Default constructor.- Parameters:
 jsonMapper- Json ObjectMapper
 
 - 
 - 
Method Details
- 
deserialize
Description copied from interface:PubSubMessageSerDesDeserializes data into a target type.- Specified by:
 deserializein interfacePubSubMessageSerDes- Parameters:
 data- byte data to deserializetype- target type- Returns:
 - the deserialized java type
 
 - 
serialize
Description copied from interface:PubSubMessageSerDesSerializes the message.- Specified by:
 serializein interfacePubSubMessageSerDes- Parameters:
 data- data to serialize- Returns:
 - byte array of serialized data
 
 - 
supportedType
- Specified by:
 supportedTypein interfacePubSubMessageSerDes- Returns:
 - The supported mime type this SerDes is capable of hanlding
 
 
 -