/** * The error (if any) that occurred from the previous walk. */ public String getError() { final Step currentStep = currentStep(); return currentStep != null ? currentStep.error : null; }
/** * The exception (if any) that occurred from the previous walk. * * <p> * Will only ever be populated if {@link #getError()} is non-null. */ public Exception getException() { final Step currentStep = currentStep(); return currentStep != null ? currentStep.exception : null; }
/** * The response returned from the previous walk. * * <p> * Once a walk/performed has been attempted, is guaranteed to return a * non-null value. (Conversely, will return <tt>null</tt> immediately after * instantiation and prior to a walk being attempted/performed). */ public RestfulResponse<?> getResponse() { final Step currentStep = currentStep(); return currentStep != null ? currentStep.response : null; }
/** * The entity returned from the previous walk. * * <p> * Will return null if the previous walk returned an error. */ public JsonRepresentation getEntity() throws JsonParseException, JsonMappingException, IOException { final Step currentStep = currentStep(); if (currentStep.response == null || currentStep.error != null) { return null; } return currentStep.response.getEntity(); }
public void walk(final String path, final JsonRepresentation invokeBody) { final Step previousStep = currentStep(); if (previousStep.error != null) { return;