Package io.micronaut.gcp.pubsub.bind
Class PubSubBodyBinder
java.lang.Object
io.micronaut.gcp.pubsub.bind.PubSubBodyBinder
- All Implemented Interfaces:
io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<io.micronaut.messaging.annotation.MessageBody,
,Object, PubSubConsumerState> io.micronaut.core.bind.ArgumentBinder<Object,
,PubSubConsumerState> PubSubAnnotatedArgumentBinder<io.micronaut.messaging.annotation.MessageBody>
,PubSubArgumentBinder<Object>
@Singleton
public class PubSubBodyBinder
extends Object
implements PubSubAnnotatedArgumentBinder<io.micronaut.messaging.annotation.MessageBody>
Binds arguments annotated with
MessageBody
and uses the appropriate
PubSubMessageSerDes
to deserialize the contents of the PubSubMessage data.- Since:
- 2.0.0
- Author:
- Vinicius Carvalho
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends Object>
-
Constructor Summary
ConstructorDescriptionPubSubBodyBinder
(io.micronaut.core.convert.ConversionService conversionService, PubSubMessageSerDesRegistry serDesRegistry) Constructs a PubSub body binder instance. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.bind.ArgumentBinder.BindingResult<Object>
bind
(io.micronaut.core.convert.ArgumentConversionContext<Object> context, PubSubConsumerState state) Class<io.micronaut.messaging.annotation.MessageBody>
-
Constructor Details
-
PubSubBodyBinder
public PubSubBodyBinder(io.micronaut.core.convert.ConversionService conversionService, PubSubMessageSerDesRegistry serDesRegistry) Constructs a PubSub body binder instance.- Parameters:
conversionService
- the conversion serviceserDesRegistry
- the SerDe registry
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationType
in interfaceio.micronaut.core.bind.annotation.AnnotatedArgumentBinder<io.micronaut.messaging.annotation.MessageBody,
Object, PubSubConsumerState>
-
bind
public io.micronaut.core.bind.ArgumentBinder.BindingResult<Object> bind(io.micronaut.core.convert.ArgumentConversionContext<Object> context, PubSubConsumerState state) - Specified by:
bind
in interfaceio.micronaut.core.bind.ArgumentBinder<Object,
PubSubConsumerState>
-