org.jboss.resteasy.client.jaxrs.internal.ClientResponse Maven / Gradle / Ivy
package org.jboss.resteasy.client.jaxrs.internal;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Map;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.ext.Providers;
import jakarta.ws.rs.ext.ReaderInterceptor;
import org.jboss.resteasy.client.jaxrs.i18n.Messages;
import org.jboss.resteasy.core.Headers;
import org.jboss.resteasy.core.ProvidersContextRetainer;
import org.jboss.resteasy.core.ResteasyContext;
import org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext;
import org.jboss.resteasy.core.interception.jaxrs.ClientReaderInterceptorContext;
import org.jboss.resteasy.plugins.providers.sse.EventInput;
import org.jboss.resteasy.specimpl.AbstractBuiltResponse;
import org.jboss.resteasy.specimpl.BuiltResponse;
import org.jboss.resteasy.spi.HeaderValueProcessor;
import org.jboss.resteasy.spi.MarshalledEntity;
import org.jboss.resteasy.spi.util.Types;
import org.jboss.resteasy.tracing.RESTEasyTracingLogger;
import org.jboss.resteasy.util.HttpHeaderNames;
import org.jboss.resteasy.util.InputStreamToByteArray;
import org.jboss.resteasy.util.ReadFromStream;
import org.reactivestreams.Publisher;
/**
* @author Bill Burke
* @version $Revision: 1 $
*/
public abstract class ClientResponse extends BuiltResponse {
// One thing to note, I don't cache header objects because I was too lazy to proxy the headers multivalued map
protected Map properties;
protected ClientConfiguration configuration;
protected RESTEasyTracingLogger tracingLogger;
@Deprecated
protected ClientResponse(final ClientConfiguration configuration) {
setClientConfiguration(configuration);
tracingLogger = RESTEasyTracingLogger.empty();
}
protected ClientResponse(final ClientConfiguration configuration, final RESTEasyTracingLogger tracingLogger) {
setClientConfiguration(configuration);
this.tracingLogger = tracingLogger;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public void setHeaders(MultivaluedMap headers) {
this.metadata = new Headers