Class NettyConverters

java.lang.Object
io.micronaut.http.server.netty.converters.NettyConverters
All Implemented Interfaces:
TypeConverterRegistrar

@Prototype @Internal public final class NettyConverters extends Object implements TypeConverterRegistrar
Factory for bytebuf related converters.
Since:
1.0
Author:
graemerocher
  • Constructor Details

  • Method Details

    • register

      public void register(MutableConversionService conversionService)
      Description copied from interface: TypeConverterRegistrar
      Interface for registrars of TypeConverter instances.
      Specified by:
      register in interface TypeConverterRegistrar
      Parameters:
      conversionService - The ConversionService
    • refCountAwareConvert

      public static <T> Optional<T> refCountAwareConvert(ConversionService service, io.netty.util.ReferenceCounted input, ArgumentConversionContext<T> context)
      This method converts a netty reference counted object and transfers release ownership to the new object.
      Type Parameters:
      T - Target type
      Parameters:
      service - The conversion service
      context - The context to convert to
      input - The object to convert
      Returns:
      The converted object
    • postProcess

      public static <T> void postProcess(io.netty.util.ReferenceCounted input, Optional<T> converted)