Class NatsHeaderConvertibleValues

java.lang.Object
io.micronaut.nats.bind.NatsHeaderConvertibleValues
All Implemented Interfaces:
io.micronaut.core.convert.ConversionServiceProvider, io.micronaut.core.convert.value.ConvertibleValues<Object>, io.micronaut.core.value.ValueResolver<CharSequence>, Iterable<Map.Entry<String,Object>>

public class NatsHeaderConvertibleValues extends Object implements io.micronaut.core.convert.value.ConvertibleValues<Object>
Converts Nats header values to the requested type.
Since:
3.1.0
Author:
James Kleeh, Joachim Grimm
  • Field Summary

    Fields inherited from interface io.micronaut.core.convert.value.ConvertibleValues

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    NatsHeaderConvertibleValues(io.nats.client.impl.Headers headers, io.micronaut.core.convert.ConversionService conversionService)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Optional<T>
    get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
     
    List<io.micronaut.core.convert.ConversionError>
     
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.core.convert.value.ConvertibleValues

    asMap, asMap, asProperties, contains, forEach, getConversionService, getValue, getValueType, isEmpty, iterator, subMap, subMap, subMap

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface io.micronaut.core.value.ValueResolver

    get, get, get
  • Constructor Details

    • NatsHeaderConvertibleValues

      public NatsHeaderConvertibleValues(io.nats.client.impl.Headers headers, io.micronaut.core.convert.ConversionService conversionService)
      Default constructor.
      Parameters:
      headers - The Nats headers
      conversionService - The conversion service
  • Method Details

    • names

      public Set<String> names()
      Specified by:
      names in interface io.micronaut.core.convert.value.ConvertibleValues<Object>
    • values

      public Collection<Object> values()
      Specified by:
      values in interface io.micronaut.core.convert.value.ConvertibleValues<Object>
    • get

      public <T> Optional<T> get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
      Specified by:
      get in interface io.micronaut.core.value.ValueResolver<CharSequence>
    • getConversionErrors

      public List<io.micronaut.core.convert.ConversionError> getConversionErrors()
      Returns:
      Any conversion errors that may have occurred