Package io.micronaut.gcp.pubsub.serdes
Class DefaultPubSubMessageSerDesRegistry
- java.lang.Object
-
- io.micronaut.gcp.pubsub.serdes.DefaultPubSubMessageSerDesRegistry
-
- All Implemented Interfaces:
PubSubMessageSerDesRegistry
@Singleton public class DefaultPubSubMessageSerDesRegistry extends java.lang.Object implements PubSubMessageSerDesRegistry
Default implementation of aPubSubMessageSerDesRegistry
.- Since:
- 2.0.0
- Author:
- Vinicius Carvalho
-
-
Constructor Summary
Constructors Constructor Description DefaultPubSubMessageSerDesRegistry(PubSubMessageSerDes[] serDes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<PubSubMessageSerDes>
find(java.lang.String contentType)
Retrieves the appropriate PubSubMessageSerDes for the provided contentType.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.gcp.pubsub.serdes.PubSubMessageSerDesRegistry
find
-
-
-
-
Constructor Detail
-
DefaultPubSubMessageSerDesRegistry
public DefaultPubSubMessageSerDesRegistry(PubSubMessageSerDes[] serDes)
- Parameters:
serDes
- list ofPubSubMessageSerDes
to be injected
-
-
Method Detail
-
find
public java.util.Optional<PubSubMessageSerDes> find(java.lang.String contentType)
Description copied from interface:PubSubMessageSerDesRegistry
Retrieves the appropriate PubSubMessageSerDes for the provided contentType.- Specified by:
find
in interfacePubSubMessageSerDesRegistry
- Parameters:
contentType
- The MIME type to search for a SerDes- Returns:
- the registered SerDes
-
-