@Singleton @Internal public class DefaultHttpClientBinderRegistry extends java.lang.Object implements HttpClientBinderRegistry
HttpClientBinderRegistry
that searches by
annotation then by type.Modifier | Constructor and Description |
---|---|
protected |
DefaultHttpClientBinderRegistry(ConversionService<?> conversionService,
java.util.List<ClientRequestBinder> binders,
BeanContext beanContext) |
Modifier and Type | Method and Description |
---|---|
<T> void |
addBinder(ClientRequestBinder binder)
Adds a binder to the registry.
|
java.util.Optional<AnnotatedClientRequestBinder<?>> |
findAnnotatedBinder(java.lang.Class<?> annotationType)
Locate an
AnnotatedClientRequestBinder for a given annotation type
(that is supposed to be applied to the method). |
<T> java.util.Optional<ClientArgumentRequestBinder<?>> |
findArgumentBinder(Argument<T> argument)
Locate an
ClientArgumentRequestBinder for the given argument. |
protected DefaultHttpClientBinderRegistry(ConversionService<?> conversionService, java.util.List<ClientRequestBinder> binders, BeanContext beanContext)
conversionService
- The conversion servicebinders
- The request bindersbeanContext
- The context to resolve beanspublic <T> java.util.Optional<ClientArgumentRequestBinder<?>> findArgumentBinder(@NonNull Argument<T> argument)
HttpClientBinderRegistry
ClientArgumentRequestBinder
for the given argument.findArgumentBinder
in interface HttpClientBinderRegistry
T
- The argument typeargument
- The argumentOptional
of ClientArgumentRequestBinder
public java.util.Optional<AnnotatedClientRequestBinder<?>> findAnnotatedBinder(@NonNull java.lang.Class<?> annotationType)
HttpClientBinderRegistry
AnnotatedClientRequestBinder
for a given annotation type
(that is supposed to be applied to the method).findAnnotatedBinder
in interface HttpClientBinderRegistry
annotationType
- - the type of annotationOptional
of AnnotatedClientRequestBinder
public <T> void addBinder(ClientRequestBinder binder)
T
- The typebinder
- The binder