use of org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptorFactory in project quarkus by quarkusio.
the class QuarkusRestClientBuilder method register.
@Override
public RestClientBuilder register(Object o, int i) {
if (o instanceof ResponseExceptionMapper) {
// local
ResponseExceptionMapper mapper = (ResponseExceptionMapper) o;
HashMap<Class<?>, Integer> contracts = new HashMap<>();
contracts.put(ResponseExceptionMapper.class, i);
registerLocalProviderInstance(mapper, contracts);
// delegate
builderDelegate.register(mapper, i);
} else if (o instanceof ParamConverterProvider) {
// local
ParamConverterProvider converter = (ParamConverterProvider) o;
HashMap<Class<?>, Integer> contracts = new HashMap<>();
contracts.put(ParamConverterProvider.class, i);
registerLocalProviderInstance(converter, contracts);
// delegate
builderDelegate.register(converter, i);
} else if (o instanceof AsyncInvocationInterceptorFactory) {
invocationInterceptorFactories.add((AsyncInvocationInterceptorFactory) o);
} else {
builderDelegate.register(o, i);
}
return this;
}
use of org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptorFactory in project quarkus by quarkusio.
the class QuarkusRestClientBuilder method register.
@Override
public RestClientBuilder register(Object o) {
if (o instanceof ResponseExceptionMapper) {
ResponseExceptionMapper mapper = (ResponseExceptionMapper) o;
register(mapper, mapper.getPriority());
} else if (o instanceof ParamConverterProvider) {
register(o, Priorities.USER);
} else if (o instanceof AsyncInvocationInterceptorFactory) {
invocationInterceptorFactories.add((AsyncInvocationInterceptorFactory) o);
} else {
builderDelegate.register(o);
}
return this;
}
Aggregations