public class CachedResponse
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContentBytes() |
java.lang.String |
getErrorMessage() |
java.lang.Integer |
getErrorStatusCode() |
boolean |
isError() |
static CachedResponse |
ofContent(byte[] contentBytes)
Constructor for success response
|
static CachedResponse |
ofError(int errorStatusCode,
java.lang.String errorMessage)
Constructor for error response
|
public static CachedResponse ofContent(byte[] contentBytes)
contentBytes - bytes array of graphql json responsepublic static CachedResponse ofError(int errorStatusCode, java.lang.String errorMessage)
errorStatusCode - the status code for the error responseerrorMessage - the error message for the error responsepublic boolean isError()
public byte[] getContentBytes()
isError() is
truepublic java.lang.Integer getErrorStatusCode()
public java.lang.String getErrorMessage()