public class RepresentationWalker extends Object
| Constructor and Description |
|---|
RepresentationWalker(RestfulClient restfulClient,
javax.ws.rs.core.Response response) |
| Modifier and Type | Method and Description |
|---|---|
JsonRepresentation |
getEntity()
The entity returned from the previous walk.
|
String |
getError()
The error (if any) that occurred from the previous walk.
|
Exception |
getException()
The exception (if any) that occurred from the previous walk.
|
RestfulResponse<?> |
getResponse()
The response returned from the previous walk.
|
void |
walk(String path) |
void |
walk(String path,
JsonRepresentation invokeBody) |
public RepresentationWalker(RestfulClient restfulClient, javax.ws.rs.core.Response response)
public void walk(String path, JsonRepresentation invokeBody)
public JsonRepresentation getEntity() throws org.codehaus.jackson.JsonParseException, org.codehaus.jackson.map.JsonMappingException, IOException
Will return null if the previous walk returned an error.
org.codehaus.jackson.JsonParseExceptionorg.codehaus.jackson.map.JsonMappingExceptionIOExceptionpublic RestfulResponse<?> getResponse()
Once a walk/performed has been attempted, is guaranteed to return a non-null value. (Conversely, will return null immediately after instantiation and prior to a walk being attempted/performed).
public Exception getException()
Will only ever be populated if getError() is non-null.
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.