Package com.yahoo.search.dispatch.rpc
Class Client.ResponseOrError<T>
java.lang.Object
com.yahoo.search.dispatch.rpc.Client.ResponseOrError<T>
- Enclosing interface:
- Client
-
Method Summary
Modifier and TypeMethodDescriptionerror()Returns the error or empty if there is a responsestatic <T> Client.ResponseOrError<T>static <T> Client.ResponseOrError<T>fromResponse(T response) static <T> Client.ResponseOrError<T>fromTimeoutError(String error) response()Returns the response, or empty if there is an errorbooleantimeout()
-
Method Details
-
fromResponse
-
fromError
-
fromTimeoutError
-
response
Returns the response, or empty if there is an error -
error
Returns the error or empty if there is a response -
timeout
public boolean timeout()- Returns:
- true if error is a timeout
-