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.MessageHeader,
,Object, PubSubConsumerState> io.micronaut.core.bind.ArgumentBinder<Object,
,PubSubConsumerState> PubSubAnnotatedArgumentBinder<io.micronaut.messaging.annotation.MessageHeader>
,PubSubArgumentBinder<Object>
@Singleton
public class PubSubHeaderBinder
extends Object
implements PubSubAnnotatedArgumentBinder<io.micronaut.messaging.annotation.MessageHeader>
Binds an argument annotated with
MessageHeader
annotation. The target type
must be supported by the ConversionService
. PubSub attributes are always of type
String.- 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
ConstructorDescriptionPubSubHeaderBinder
(io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.bind.ArgumentBinder.BindingResult<Object>
bind
(io.micronaut.core.convert.ArgumentConversionContext<Object> context, PubSubConsumerState source) Class<io.micronaut.messaging.annotation.MessageHeader>
-
Constructor Details
-
PubSubHeaderBinder
public PubSubHeaderBinder(io.micronaut.core.convert.ConversionService conversionService)
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationType
in interfaceio.micronaut.core.bind.annotation.AnnotatedArgumentBinder<io.micronaut.messaging.annotation.MessageHeader,
Object, PubSubConsumerState>
-
bind
public io.micronaut.core.bind.ArgumentBinder.BindingResult<Object> bind(io.micronaut.core.convert.ArgumentConversionContext<Object> context, PubSubConsumerState source) - Specified by:
bind
in interfaceio.micronaut.core.bind.ArgumentBinder<Object,
PubSubConsumerState>
-