java.lang.Object
ca.on.oicr.gsi.shesmu.plugin.json.JsonListBodyHandler<W>
- All Implemented Interfaces:
HttpResponse.BodyHandler<Supplier<Stream<W>>>
public final class JsonListBodyHandler<W>
extends Object
implements HttpResponse.BodyHandler<Supplier<Stream<W>>>
Read a JSON array response from an HTTP connection and decode it via Jackson into a stream
-
Constructor Summary
ConstructorDescriptionJsonListBodyHandler
(com.fasterxml.jackson.databind.ObjectMapper mapper, com.fasterxml.jackson.core.type.TypeReference<W> targetType) JsonListBodyHandler
(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<W> targetType) -
Method Summary
-
Constructor Details
-
JsonListBodyHandler
-
JsonListBodyHandler
public JsonListBodyHandler(com.fasterxml.jackson.databind.ObjectMapper mapper, com.fasterxml.jackson.core.type.TypeReference<W> targetType)
-
-
Method Details
-
apply
public HttpResponse.BodySubscriber<Supplier<Stream<W>>> apply(HttpResponse.ResponseInfo responseInfo) - Specified by:
apply
in interfaceHttpResponse.BodyHandler<W>
-