public class RestResponse extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
contentType |
protected boolean |
error |
protected String |
firstLink |
protected String |
lastLink |
protected String |
location |
protected String |
nextLink |
protected String |
previousLink |
protected String |
responseText |
protected int |
status |
Constructor and Description |
---|
RestResponse() |
RestResponse(String text,
int status) |
Modifier and Type | Method and Description |
---|---|
static RestResponse |
createRestResponse(org.apache.http.HttpResponse httpResponse) |
String |
getContentType() |
String |
getFirstLink() |
String |
getLastLink() |
String |
getLocation() |
String |
getNextLink() |
String |
getPreviousLink() |
String |
getResponseText() |
int |
getStatus() |
boolean |
isError() |
boolean |
isJson() |
void |
parseLinkHeader(String link)
This parses out the Link for the first, next and prev.
|
void |
setContentType(String contentType) |
void |
setError(boolean error) |
void |
setFirstLink(String firstLink) |
void |
setLastLink(String lastLink) |
void |
setLocation(String location) |
void |
setNextLink(String nextLink) |
void |
setPreviousLink(String previousLink) |
void |
setResponseText(String responseText) |
void |
setStatus(int status) |
String |
toString() |
protected String responseText
protected boolean error
protected String contentType
protected String location
protected int status
protected String firstLink
protected String lastLink
protected String nextLink
protected String previousLink
public RestResponse()
public RestResponse(String text, int status)
public static RestResponse createRestResponse(org.apache.http.HttpResponse httpResponse)
public void parseLinkHeader(String link)
link
- the link.public int getStatus()
public String getResponseText()
public boolean isError()
public void setContentType(String contentType)
public boolean isJson()
public String getLocation()
public void setLocation(String location)
public String getContentType()
public void setResponseText(String responseText)
public void setError(boolean error)
public void setStatus(int status)
public String getFirstLink()
public void setFirstLink(String firstLink)
public String getLastLink()
public void setLastLink(String lastLink)
public String getNextLink()
public void setNextLink(String nextLink)
public String getPreviousLink()
public void setPreviousLink(String previousLink)
Copyright © 2015. All Rights Reserved.