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

    Constructors
    Constructor
    Description
    PubSubHeaderBinder(io.micronaut.core.convert.ConversionService conversionService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.core.bind.ArgumentBinder.BindingResult<Object>
    bind(io.micronaut.core.convert.ArgumentConversionContext<Object> context, PubSubConsumerState source)
     
    Class<io.micronaut.messaging.annotation.MessageHeader>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PubSubHeaderBinder

      public PubSubHeaderBinder(io.micronaut.core.convert.ConversionService conversionService)
  • Method Details

    • getAnnotationType

      public Class<io.micronaut.messaging.annotation.MessageHeader> getAnnotationType()
      Specified by:
      getAnnotationType in interface io.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 interface io.micronaut.core.bind.ArgumentBinder<Object,PubSubConsumerState>