Top Description Fields Constructors Methods
org.eclipse.jetty.client

public Class Result

extends Object
Class Inheritance

The result of a request / response exchange, containing the Request, the Response and eventual failures of either.

Field Summary

Modifier and TypeField and Description
private final Request
private final Throwable
private final Response
private final Throwable

Constructor Summary

AccessConstructor and Description
public
Result(Request request, Response response)

public
Result(Request request, Response response, Throwable responseFailure)

public
Result(Request request, Throwable requestFailure, Response response)

public
Result(Request request, Throwable requestFailure, Response response, Throwable responseFailure)

public
Result(Result result, Throwable responseFailure)

Method Summary

Modifier and TypeMethod and Description
public Throwable

Returns:

the response failure, if any, otherwise the request failure, if any
getFailure
()

Get the response failure, if any, otherwise the request failure, if any.

public Request

Returns:

the request object
getRequest
()

Get the request object.

public Throwable

Returns:

the request failure, if any
getRequestFailure
()

Get the request failure, if any.

public Response

Returns:

the response object
getResponse
()

Get the response object.

public Throwable

Returns:

the response failure, if any
getResponseFailure
()

Get the response failure, if any.

public boolean
isFailed()

Returns: whether either the response or the request failed

public boolean
isSucceeded()

Returns: whether both the request and the response succeeded

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

requestback to summary
private final Request request
requestFailureback to summary
private final Throwable requestFailure
responseback to summary
private final Response response
responseFailureback to summary
private final Throwable responseFailure

Constructor Detail

Resultback to summary
public Result(Request request, Response response)
Resultback to summary
public Result(Request request, Response response, Throwable responseFailure)
Resultback to summary
public Result(Request request, Throwable requestFailure, Response response)
Resultback to summary
public Result(Request request, Throwable requestFailure, Response response, Throwable responseFailure)
Resultback to summary
public Result(Result result, Throwable responseFailure)

Method Detail

getFailureback to summary
public Throwable getFailure()

Get the response failure, if any, otherwise the request failure, if any.

Returns:Throwable

the response failure, if any, otherwise the request failure, if any

getRequestback to summary
public Request getRequest()

Get the request object.

Returns:Request

the request object

getRequestFailureback to summary
public Throwable getRequestFailure()

Get the request failure, if any.

Returns:Throwable

the request failure, if any

getResponseback to summary
public Response getResponse()

Get the response object.

Returns:Response

the response object

getResponseFailureback to summary
public Throwable getResponseFailure()

Get the response failure, if any.

Returns:Throwable

the response failure, if any

isFailedback to summary
public boolean isFailed()
Returns:boolean

whether either the response or the request failed

isSucceededback to summary
public boolean isSucceeded()
Returns:boolean

whether both the request and the response succeeded

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override