Class Result<T>
- java.lang.Object
-
- com.alibaba.graphscope.interactive.client.common.Result<T>
-
public class Result<T> extends Object
A class which wrap the result of the API
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Result<T>
error(String message)
static <T> Result<T>
fromException(com.alibaba.graphscope.interactive.ApiException exception)
static <T> Result<T>
fromResponse(com.alibaba.graphscope.interactive.ApiResponse<T> response)
Status
getStatus()
com.alibaba.graphscope.interactive.proto.Code
getStatusCode()
String
getStatusMessage()
T
getValue()
boolean
isOk()
static <T> Result<T>
ok(T value)
-
-
-
Method Detail
-
getStatus
public Status getStatus()
-
getStatusMessage
public String getStatusMessage()
-
getStatusCode
public com.alibaba.graphscope.interactive.proto.Code getStatusCode()
-
getValue
public T getValue()
-
ok
public static <T> Result<T> ok(T value)
-
fromException
public static <T> Result<T> fromException(com.alibaba.graphscope.interactive.ApiException exception)
-
fromResponse
public static <T> Result<T> fromResponse(com.alibaba.graphscope.interactive.ApiResponse<T> response)
-
isOk
public boolean isOk()
-
-