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.body.MessageBodyHandlerRegistry messageBodyHandlerRegistry, io.micronaut.core.convert.ConversionService conversionService, List<io.micronaut.http.bind.binders.RequestArgumentBinder> binders, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder, io.micronaut.json.JsonMapper jsonMapper)
    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.body.MessageBodyHandlerRegistry messageBodyHandlerRegistry, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder, io.micronaut.json.JsonMapper jsonMapper)
    Creates the servlet body binder.

    Methods inherited from class 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.body.MessageBodyHandlerRegistry messageBodyHandlerRegistry, io.micronaut.core.convert.ConversionService conversionService, List<io.micronaut.http.bind.binders.RequestArgumentBinder> binders, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder, io.micronaut.json.JsonMapper jsonMapper)
      Default constructor.
      Parameters:
      messageBodyHandlerRegistry - The message body handler registry
      conversionService - The conversion service
      binders - Any registered binders
      defaultBodyAnnotationBinder - The delegate default body binder
      jsonMapper - The JSON mapper
  • Method Details

    • newServletBodyBinder

      protected ServletBodyBinder<T> newServletBodyBinder(io.micronaut.http.body.MessageBodyHandlerRegistry messageBodyHandlerRegistry, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder, io.micronaut.json.JsonMapper jsonMapper)
      Creates the servlet body binder.
      Parameters:
      messageBodyHandlerRegistry - The message body handler registry
      conversionService - The conversion service
      defaultBodyAnnotationBinder - Default Body annotation Binder
      jsonMapper - The JSON mapper
      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>