Package io.micronaut.nats.serdes
Class DefaultNatsMessageSerDesRegistry
java.lang.Object
io.micronaut.nats.serdes.DefaultNatsMessageSerDesRegistry
- All Implemented Interfaces:
NatsMessageSerDesRegistry
@Singleton
public class DefaultNatsMessageSerDesRegistry
extends Object
implements NatsMessageSerDesRegistry
Default implementation of
NatsMessageSerDesRegistry
.- Since:
- 1.0.0
- Author:
- jgrimm
-
Constructor Summary
ConstructorDescriptionDefaultNatsMessageSerDesRegistry
(NatsMessageSerDes<?>... serDes) Default constructor. -
Method Summary
Modifier and TypeMethodDescription<T> Optional<NatsMessageSerDes<T>>
findSerdes
(io.micronaut.core.type.Argument<T> type) Returns the serdes that supports the given type.
-
Constructor Details
-
DefaultNatsMessageSerDesRegistry
Default constructor.- Parameters:
serDes
- The serdes to be registered.
-
-
Method Details
-
findSerdes
Description copied from interface:NatsMessageSerDesRegistry
Returns the serdes that supports the given type.- Specified by:
findSerdes
in interfaceNatsMessageSerDesRegistry
- Type Parameters:
T
- The type to be serialized/deserialized- Parameters:
type
- The type- Returns:
- An optional serdes
-