public class ServiceResponseBuilder<T> extends Object
ServiceResponse. Intended for internal use only.| Modifier and Type | Method and Description |
|---|---|
ServiceResponse<T> |
build()
Constructs the immutable
MultiResponse instance. |
static <T> ServiceResponseBuilder<T> |
newServiceResponse()
Returns a new builder instance used to create immutable
MultiResponse instances |
ServiceResponseBuilder<T> |
withException(RuntimeException exception)
Set the exception thrown based on service errors in the response or an error parsing the JSON.
|
ServiceResponseBuilder<T> |
withResponse(T response)
Sets the entity received in the response element of the JSON response body.
|
ServiceResponseBuilder<T> |
withRuid(String ruid)
Set the unique ID of the request this is a response to.
|
ServiceResponseBuilder<T> |
withStatus(int status)
Set the HTTP status code returned for this individual response.
|
public static <T> ServiceResponseBuilder<T> newServiceResponse()
MultiResponse instancespublic ServiceResponse<T> build()
MultiResponse instance.MultiResponse instance.public ServiceResponseBuilder<T> withRuid(String ruid)
ruid - unique ID of a request.public ServiceResponseBuilder<T> withStatus(int status)
status - HTTP status code of the individual request.public ServiceResponseBuilder<T> withResponse(T response)
response - response entity.public ServiceResponseBuilder<T> withException(RuntimeException exception)
exception - exception thrown processing the response.Copyright © 2014. All Rights Reserved.