use of org.jboss.resteasy.spi.AsyncClientResponseProvider in project resteasy by resteasy.
the class ClientHelper method addAsyncClientResponseProvider.
public void addAsyncClientResponseProvider(Class provider) {
AsyncClientResponseProvider providerInstance = rpf.createProviderInstance((Class<? extends AsyncClientResponseProvider>) provider);
addAsyncClientResponseProvider(providerInstance, provider);
}
use of org.jboss.resteasy.spi.AsyncClientResponseProvider in project resteasy by resteasy.
the class ClientHelper method addAsyncClientResponseProvider.
private void addAsyncClientResponseProvider(final AsyncClientResponseProvider provider, final Class providerClass) {
Type asyncType = Types.getActualTypeArgumentsOfAnInterface(providerClass, AsyncClientResponseProvider.class)[0];
Utils.injectProperties(rpf, provider.getClass(), provider);
Class<?> asyncClass = Types.getRawType(asyncType);
Map<Class<?>, AsyncClientResponseProvider> registry = getAsyncClientResponseProvidersForWrite();
registry.put(asyncClass, provider);
attachedAsyncClientResponseProviders = false;
asyncClientResponseProviders = registry;
}
Aggregations