Package io.airlift.http.client
Class JsonResponseHandler<T>
- java.lang.Object
-
- io.airlift.http.client.JsonResponseHandler<T>
-
- All Implemented Interfaces:
ResponseHandler<T,RuntimeException>
public class JsonResponseHandler<T> extends Object implements ResponseHandler<T,RuntimeException>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> JsonResponseHandler<T>createJsonResponseHandler(JsonCodec<T> jsonCodec)static <T> JsonResponseHandler<T>createJsonResponseHandler(JsonCodec<T> jsonCodec, int firstSuccessfulResponseCode, int... otherSuccessfulResponseCodes)Thandle(Request request, Response response)ThandleException(Request request, Exception exception)
-
-
-
Method Detail
-
createJsonResponseHandler
public static <T> JsonResponseHandler<T> createJsonResponseHandler(JsonCodec<T> jsonCodec)
-
createJsonResponseHandler
public static <T> JsonResponseHandler<T> createJsonResponseHandler(JsonCodec<T> jsonCodec, int firstSuccessfulResponseCode, int... otherSuccessfulResponseCodes)
-
handleException
public T handleException(Request request, Exception exception)
- Specified by:
handleExceptionin interfaceResponseHandler<T,RuntimeException>
-
handle
public T handle(Request request, Response response)
- Specified by:
handlein interfaceResponseHandler<T,RuntimeException>
-
-