io.quarkus.rest.client.reactive.jackson.runtime.serialisers.ClientJacksonMessageBodyReader Maven / Gradle / Ivy
package io.quarkus.rest.client.reactive.jackson.runtime.serialisers;
import static io.quarkus.rest.client.reactive.jackson.runtime.serialisers.JacksonUtil.getObjectMapperFromContext;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.function.Function;
import jakarta.inject.Inject;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
import org.jboss.logging.Logger;
import org.jboss.resteasy.reactive.ClientWebApplicationException;
import org.jboss.resteasy.reactive.client.impl.RestClientRequestContext;
import org.jboss.resteasy.reactive.client.spi.ClientRestHandler;
import org.jboss.resteasy.reactive.common.util.EmptyInputStream;
import org.jboss.resteasy.reactive.server.jackson.JacksonBasicMessageBodyReader;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
public class ClientJacksonMessageBodyReader extends JacksonBasicMessageBodyReader implements ClientRestHandler {
private static final Logger log = Logger.getLogger(ClientJacksonMessageBodyReader.class);
private final ConcurrentMap objectReaderMap = new ConcurrentHashMap<>();
private RestClientRequestContext context;
@Inject
public ClientJacksonMessageBodyReader(ObjectMapper mapper) {
super(mapper);
}
@Override
public Object readFrom(Class
© 2015 - 2025 Weber Informatics LLC | Privacy Policy