Package io.micronaut.servlet.http
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
Modifier and TypeFieldDescriptionprotected final Map<Class<? extends Annotation>,
io.micronaut.http.bind.binders.RequestArgumentBinder> -
Constructor Summary
ConstructorDescriptionServletBinderRegistry
(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 TypeMethodDescription<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
-
-
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 registryconversionService
- The conversion servicebinders
- Any registered bindersdefaultBodyAnnotationBinder
- 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 registryconversionService
- The conversion servicedefaultBodyAnnotationBinder
- 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 interfaceio.micronaut.core.bind.ArgumentBinderRegistry<T>
-