All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sumologic.client.util.DeserializingResponseHandler Maven / Gradle / Ivy

package com.sumologic.client.util;

import org.apache.http.HttpResponse;

import java.io.IOException;
import java.io.InputStream;

public class DeserializingResponseHandler
        implements ResponseHandler {

    private Class clazz;

    public DeserializingResponseHandler(Class clazz) {
        this.clazz = clazz;
    }

    @Override
    public Response handle(HttpResponse httpResponse, InputStream httpStream, Request request)
            throws IOException {

        return JacksonUtils.MAPPER.readValue(httpStream, clazz);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy