Package io.micronaut.http.bind
Class DefaultRequestBinderRegistry
java.lang.Object
io.micronaut.http.bind.DefaultRequestBinderRegistry
- All Implemented Interfaces:
io.micronaut.core.bind.ArgumentBinderRegistry<HttpRequest<?>>,RequestBinderRegistry
@Singleton
public class DefaultRequestBinderRegistry
extends Object
implements RequestBinderRegistry
Default implementation of the
RequestBinderRegistry interface.- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRequestBinderRegistry(io.micronaut.core.convert.ConversionService conversionService, RequestArgumentBinder... binders) DefaultRequestBinderRegistry(io.micronaut.core.convert.ConversionService conversionService, List<RequestArgumentBinder> binders) DefaultRequestBinderRegistry(io.micronaut.core.convert.ConversionService conversionService, List<RequestArgumentBinder> binders, DefaultBodyAnnotationBinder bodyAnnotationBinder) -
Method Summary
Modifier and TypeMethodDescription<T> voidaddArgumentBinder(io.micronaut.core.bind.ArgumentBinder<T, HttpRequest<?>> binder) voidAdds a request argument binder that will be used to match the argument that wasn't matched by a type or an annotation.<T> Optional<io.micronaut.core.bind.ArgumentBinder<T,HttpRequest<?>>> findArgumentBinder(io.micronaut.core.type.Argument<T> argument) protected <T> RequestArgumentBinderfindBinder(io.micronaut.core.type.Argument<T> argument, Class<? extends Annotation> annotationType) protected voidregisterDefaultAnnotationBinders(Map<Class<? extends Annotation>, RequestArgumentBinder> byAnnotation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.bind.ArgumentBinderRegistry
addRequestArgumentBinder, findArgumentBinder
-
Constructor Details
-
DefaultRequestBinderRegistry
public DefaultRequestBinderRegistry(io.micronaut.core.convert.ConversionService conversionService, RequestArgumentBinder... binders) - Parameters:
conversionService- The conversion servicebinders- The request argument binders
-
DefaultRequestBinderRegistry
public DefaultRequestBinderRegistry(io.micronaut.core.convert.ConversionService conversionService, List<RequestArgumentBinder> binders) -
DefaultRequestBinderRegistry
@Inject public DefaultRequestBinderRegistry(io.micronaut.core.convert.ConversionService conversionService, List<RequestArgumentBinder> binders, DefaultBodyAnnotationBinder bodyAnnotationBinder) - Parameters:
conversionService- The conversion servicebinders- The request argument bindersbodyAnnotationBinder- The body annotation binder
-
-
Method Details
-
addArgumentBinder
- Specified by:
addArgumentBinderin interfaceio.micronaut.core.bind.ArgumentBinderRegistry<HttpRequest<?>>
-
addUnmatchedRequestArgumentBinder
Description copied from interface:RequestBinderRegistryAdds a request argument binder that will be used to match the argument that wasn't matched by a type or an annotation.- Specified by:
addUnmatchedRequestArgumentBinderin interfaceRequestBinderRegistry- Parameters:
binder- The binder
-
findArgumentBinder
public <T> Optional<io.micronaut.core.bind.ArgumentBinder<T,HttpRequest<?>>> findArgumentBinder(io.micronaut.core.type.Argument<T> argument) - Specified by:
findArgumentBinderin interfaceio.micronaut.core.bind.ArgumentBinderRegistry<HttpRequest<?>>
-
findBinder
protected <T> RequestArgumentBinder findBinder(io.micronaut.core.type.Argument<T> argument, Class<? extends Annotation> annotationType) - Type Parameters:
T- The type- Parameters:
argument- The argumentannotationType- The class for annotation- Returns:
- The request argument binder
-
registerDefaultAnnotationBinders
protected void registerDefaultAnnotationBinders(Map<Class<? extends Annotation>, RequestArgumentBinder> byAnnotation) - Parameters:
byAnnotation- The request argument binder
-