use of org.jboss.resteasy.spi.AsyncStreamProvider in project resteasy by resteasy.
the class ServerHelper method addAsyncStreamProvider.
private void addAsyncStreamProvider(AsyncStreamProvider provider, Class providerClass) {
Type asyncType = Types.getActualTypeArgumentsOfAnInterface(providerClass, AsyncStreamProvider.class)[0];
Utils.injectProperties(rpf, provider.getClass(), provider);
Class<?> asyncClass = Types.getRawType(asyncType);
Map<Class<?>, AsyncStreamProvider> registry = getAsyncStreamProvidersForWrite();
registry.put(asyncClass, provider);
attachedAsyncStreamProviders = false;
asyncStreamProviders = registry;
}
Aggregations