Search in sources :

Example 1 with AsyncClientResponseProvider

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);
}
Also used : AsyncClientResponseProvider(org.jboss.resteasy.spi.AsyncClientResponseProvider)

Example 2 with AsyncClientResponseProvider

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

Aggregations

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