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