public abstract class ResponseReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BODY_FRAGMENT_CHARS |
| Constructor and Description |
|---|
ResponseReader(boolean ignoreHttpErrorCodes) |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Throwable,C extends Class<? extends T>> |
findCause(Throwable root,
C... ofClasses)
Search the cause chain of t (starting from and including t) for a Throwable
that is assignable to any of ofClasses, or null if not found.
|
boolean |
isIgnoreHttpErrorCodes() |
Object |
read(InvocationResult invocationResult,
RestMethodMetadata methodMetadata) |
protected abstract <T> T |
read(String httpBody,
Type returnType) |
protected abstract RuntimeException |
readException(String httpBody,
Class<? extends RuntimeException> exceptionType) |
public static final int BODY_FRAGMENT_CHARS
public boolean isIgnoreHttpErrorCodes()
public Object read(InvocationResult invocationResult, RestMethodMetadata methodMetadata) throws IOException
IOExceptionprotected abstract <T> T read(String httpBody, Type returnType) throws IOException, ExceptionalReturnContentException
protected abstract RuntimeException readException(String httpBody, Class<? extends RuntimeException> exceptionType) throws IOException
IOException@SafeVarargs public static <T extends Throwable,C extends Class<? extends T>> T findCause(Throwable root, C... ofClasses)
T - This should be figured out by the compiler: the lowest common ancestor of ofClasses.C - Should be figured out by the compiler too.ofClasses - Throwable classes in order of priority to be searched for.root - The cause from which the search is to be started.Copyright © 2012–2021. All rights reserved.