Class ServletBinderRegistry<T>

java.lang.Object
io.micronaut.servlet.http.ServletBinderRegistry<T>
Type Parameters:
T - The type
All Implemented Interfaces:
io.micronaut.core.bind.ArgumentBinderRegistry<io.micronaut.http.HttpRequest<?>>, io.micronaut.http.bind.RequestBinderRegistry

public abstract class ServletBinderRegistry<T> extends Object implements io.micronaut.http.bind.RequestBinderRegistry
A RequestBinderRegistry implementation specifically for Serverless functions over HTTP.
Since:
2.0.0
Author:
graemerocher
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<Class<? extends Annotation>,io.micronaut.http.bind.binders.RequestArgumentBinder>
     
    protected final Map<Class<?>,io.micronaut.http.bind.binders.RequestArgumentBinder>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServletBinderRegistry(io.micronaut.http.codec.MediaTypeCodecRegistry mediaTypeCodecRegistry, io.micronaut.core.convert.ConversionService conversionService, List<io.micronaut.http.bind.binders.RequestArgumentBinder> binders, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Optional<io.micronaut.core.bind.ArgumentBinder<T,io.micronaut.http.HttpRequest<?>>>
    findArgumentBinder(io.micronaut.core.type.Argument<T> argument)
     
    protected ServletBodyBinder<T>
    newServletBodyBinder(io.micronaut.http.codec.MediaTypeCodecRegistry mediaTypeCodecRegistry, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder)
    Creates the servlet body binder.

    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.bind.ArgumentBinderRegistry

    addArgumentBinder, addRequestArgumentBinder, findArgumentBinder

    Methods inherited from interface io.micronaut.http.bind.RequestBinderRegistry

    addUnmatchedRequestArgumentBinder
  • Field Details

    • byAnnotation

      protected final Map<Class<? extends Annotation>,io.micronaut.http.bind.binders.RequestArgumentBinder> byAnnotation
    • byType

      protected final Map<Class<?>,io.micronaut.http.bind.binders.RequestArgumentBinder> byType
  • Constructor Details

    • ServletBinderRegistry

      public ServletBinderRegistry(io.micronaut.http.codec.MediaTypeCodecRegistry mediaTypeCodecRegistry, io.micronaut.core.convert.ConversionService conversionService, List<io.micronaut.http.bind.binders.RequestArgumentBinder> binders, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder)
      Default constructor.
      Parameters:
      mediaTypeCodecRegistry - The media type codec registry
      conversionService - The conversion service
      binders - Any registered binders
      defaultBodyAnnotationBinder - The delegate default body binder
  • Method Details

    • newServletBodyBinder

      protected ServletBodyBinder<T> newServletBodyBinder(io.micronaut.http.codec.MediaTypeCodecRegistry mediaTypeCodecRegistry, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder)
      Creates the servlet body binder.
      Parameters:
      mediaTypeCodecRegistry - The media type registry
      conversionService - The conversion service
      defaultBodyAnnotationBinder - Default Body annotation Binder
      Returns:
      The servlet body
    • findArgumentBinder

      public <T> Optional<io.micronaut.core.bind.ArgumentBinder<T,io.micronaut.http.HttpRequest<?>>> findArgumentBinder(io.micronaut.core.type.Argument<T> argument)
      Specified by:
      findArgumentBinder in interface io.micronaut.core.bind.ArgumentBinderRegistry<T>