Package io.micronaut.gcp.pubsub.bind
Class PubSubHeaderBinder
- java.lang.Object
-
- io.micronaut.gcp.pubsub.bind.PubSubHeaderBinder
-
- All Implemented Interfaces:
io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<io.micronaut.messaging.annotation.Header,java.lang.Object,PubSubConsumerState>
,io.micronaut.core.bind.ArgumentBinder<java.lang.Object,PubSubConsumerState>
,PubSubAnnotatedArgumentBinder<io.micronaut.messaging.annotation.Header>
,PubSubArgumentBinder<java.lang.Object>
@Singleton public class PubSubHeaderBinder extends java.lang.Object implements PubSubAnnotatedArgumentBinder<io.micronaut.messaging.annotation.Header>
Binds an argument annotated withHeader
annotation. The target type must be supported by theConversionService
. PubSub attributes are always of type String.- Since:
- 2.0.0
- Author:
- Vinicius Carvalho
-
-
Constructor Summary
Constructors Constructor Description PubSubHeaderBinder(io.micronaut.core.convert.ConversionService conversionService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.micronaut.core.bind.ArgumentBinder.BindingResult<java.lang.Object>
bind(io.micronaut.core.convert.ArgumentConversionContext<java.lang.Object> context, PubSubConsumerState source)
java.lang.Class<io.micronaut.messaging.annotation.Header>
getAnnotationType()
-
-
-
Method Detail
-
getAnnotationType
public java.lang.Class<io.micronaut.messaging.annotation.Header> getAnnotationType()
- Specified by:
getAnnotationType
in interfaceio.micronaut.core.bind.annotation.AnnotatedArgumentBinder<io.micronaut.messaging.annotation.Header,java.lang.Object,PubSubConsumerState>
-
bind
public io.micronaut.core.bind.ArgumentBinder.BindingResult<java.lang.Object> bind(io.micronaut.core.convert.ArgumentConversionContext<java.lang.Object> context, PubSubConsumerState source)
- Specified by:
bind
in interfaceio.micronaut.core.bind.ArgumentBinder<java.lang.Object,PubSubConsumerState>
-
-