|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.facebook.Response
public class Response
Encapsulates the response, successful or otherwise, of a call to the Facebook platform.
Nested Class Summary | |
---|---|
static class |
Response.PagingDirection
Indicates whether paging is being done forward or backward. |
Field Summary | |
---|---|
static String |
NON_JSON_RESPONSE_PROPERTY
Property name of non-JSON results in the GraphObject. |
Method Summary | ||
---|---|---|
HttpURLConnection |
getConnection()
Returns the HttpURLConnection that this response was generated from. |
|
FacebookRequestError |
getError()
Returns information about any errors that may have occurred during the request. |
|
GraphObject |
getGraphObject()
The single graph object returned for this request, if any. |
|
|
getGraphObjectAs(Class<T> graphObjectClass)
The single graph object returned for this request, if any, cast into a particular type of GraphObject. |
|
GraphObjectList<GraphObject> |
getGraphObjectList()
The list of graph objects returned for this request, if any. |
|
|
getGraphObjectListAs(Class<T> graphObjectClass)
The list of graph objects returned for this request, if any, cast into a particular type of GraphObject. |
|
boolean |
getIsFromCache()
Indicates whether the response was retrieved from a local cache or from the server. |
|
Request |
getRequest()
Returns the request that this response is for. |
|
Request |
getRequestForPagedResults(Response.PagingDirection direction)
If a Response contains results that contain paging information, returns a new Request that will retrieve the next page of results, in whichever direction is desired. |
|
String |
toString()
Provides a debugging string for this response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NON_JSON_RESPONSE_PROPERTY
Method Detail |
---|
public final FacebookRequestError getError()
public final GraphObject getGraphObject()
public final <T extends GraphObject> T getGraphObjectAs(Class<T> graphObjectClass)
graphObjectClass
- the GraphObject-derived interface to cast the graph object into
FacebookException
- If the passed in Class is not a valid GraphObject interfacepublic final GraphObjectList<GraphObject> getGraphObjectList()
public final <T extends GraphObject> GraphObjectList<T> getGraphObjectListAs(Class<T> graphObjectClass)
graphObjectClass
- the GraphObject-derived interface to cast the graph objects into
FacebookException
- If the passed in Class is not a valid GraphObject interfacepublic final HttpURLConnection getConnection()
public Request getRequest()
public Request getRequestForPagedResults(Response.PagingDirection direction)
direction
- enum indicating whether to page forward or backward
public String toString()
toString
in class Object
public final boolean getIsFromCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |