Package com.teracloud.streams.rest
Interface Result<T,R>
- Type Parameters:
T
- Type of the element being created.R
- Type of the raw response.
public interface Result<T,R>
Represents a result from a REST request.
Any method that returns a
Result
defines what
values are returned by its methods.- Since:
- 1.8
-
Method Details
-
getId
String getId()Get the object identifier associated with the request.- Returns:
- object identifier associated with the request.
-
getElement
Get the element associated with the request.- Returns:
- element associated with the request.
- Throws:
IOException
- Error communicating with REST server.
-
getRawResult
R getRawResult()Get the raw result from the request.
Unless specified by the method returning aResult
the contents of a raw result are not guaranteed to be stable across releases.- Returns:
- raw result from the request.
-
isOk
boolean isOk()Was the request successful.- Returns:
true
if the request was successful,false
otherwise.
-