Class ServletBodyBinder<T>

java.lang.Object
io.micronaut.servlet.http.ServletBodyBinder<T>
Type Parameters:
T - The body type
All Implemented Interfaces:
io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<io.micronaut.http.annotation.Body,T,io.micronaut.http.HttpRequest<?>>, io.micronaut.core.bind.ArgumentBinder<T,io.micronaut.http.HttpRequest<?>>, io.micronaut.http.bind.binders.AnnotatedRequestArgumentBinder<io.micronaut.http.annotation.Body,T>, io.micronaut.http.bind.binders.RequestArgumentBinder<T>

public class ServletBodyBinder<T> extends Object implements io.micronaut.http.bind.binders.AnnotatedRequestArgumentBinder<io.micronaut.http.annotation.Body,T>
Allows binding the body from a ServletHttpRequest.
Since:
2.0.0
Author:
graemerocher
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder

    io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final io.micronaut.core.convert.ConversionService
     
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    io.micronaut.core.bind.ArgumentBinder.BindingResult<T>
    bind(io.micronaut.core.convert.ArgumentConversionContext<T> context, io.micronaut.http.HttpRequest<?> source)
     
    Class<io.micronaut.http.annotation.Body>
     

    Methods inherited from class java.lang.Object

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

    • conversionService

      protected final io.micronaut.core.convert.ConversionService conversionService
  • Constructor Details

    • ServletBodyBinder

      protected ServletBodyBinder(io.micronaut.core.convert.ConversionService conversionService, io.micronaut.http.codec.MediaTypeCodecRegistry mediaTypeCodecRegistry, io.micronaut.http.bind.binders.DefaultBodyAnnotationBinder<T> defaultBodyAnnotationBinder)
      Default constructor.
      Parameters:
      conversionService - The conversion service
      mediaTypeCodecRegistry - The codec registry
      defaultBodyAnnotationBinder - The delegate default body binder
  • Method Details

    • getAnnotationType

      public Class<io.micronaut.http.annotation.Body> getAnnotationType()
      Specified by:
      getAnnotationType in interface io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<io.micronaut.http.annotation.Body,T,io.micronaut.http.HttpRequest<?>>
    • bind

      public io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bind(io.micronaut.core.convert.ArgumentConversionContext<T> context, io.micronaut.http.HttpRequest<?> source)
      Specified by:
      bind in interface io.micronaut.core.bind.ArgumentBinder<T,io.micronaut.http.HttpRequest<?>>