Package com.restfb.batch
Class BatchResponse
- java.lang.Object
-
- com.restfb.batch.BatchResponse
-
public class BatchResponse extends Object
Encapsulates a discrete part of an entire Facebook Batch API response.- Since:
- 1.6.5
- Author:
- Mark Allen
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BatchResponse()
"Magic" no-argument constructor so we can reflectively make instances of this class with DefaultJsonMapper, but normal client code cannot.BatchResponse(Integer code, List<BatchHeader> headers, String body)
Creates a batch response with the given HTTP response status code, headers, and JSON body.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object that)
String
getBody()
The HTTP response body JSON.Integer
getCode()
The HTTP status code for this response.List<BatchHeader>
getHeaders()
The HTTP response headers.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
BatchResponse
protected BatchResponse()
"Magic" no-argument constructor so we can reflectively make instances of this class with DefaultJsonMapper, but normal client code cannot.
-
BatchResponse
public BatchResponse(Integer code, List<BatchHeader> headers, String body)
Creates a batch response with the given HTTP response status code, headers, and JSON body.- Parameters:
code
- HTTP status code.headers
- HTTP headers.body
- JSON body.
-
-
Method Detail
-
getCode
public Integer getCode()
The HTTP status code for this response.- Returns:
- The HTTP status code for this response.
-
getHeaders
public List<BatchHeader> getHeaders()
The HTTP response headers.- Returns:
- The HTTP response headers.
-
-