Search in sources :

Example 1 with AsyncStreamProvider

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;
}
Also used : RuntimeType(jakarta.ws.rs.RuntimeType) Type(java.lang.reflect.Type) AsyncStreamProvider(org.jboss.resteasy.spi.AsyncStreamProvider)

Aggregations

RuntimeType (jakarta.ws.rs.RuntimeType)1 Type (java.lang.reflect.Type)1 AsyncStreamProvider (org.jboss.resteasy.spi.AsyncStreamProvider)1