类 CommandResponse<R>
java.lang.Object
com.alibaba.csp.sentinel.command.CommandResponse<R>
- 类型参数:
R- type of the result
Command response representation of command center.
- 作者:
- Eric Zhao
-
方法概要
修饰符和类型方法说明booleanstatic <T> CommandResponse<T>Construct a failed response with given exception.static <T> CommandResponse<T>Construct a failed response with given exception.static <T> CommandResponse<T>ofSuccess(T result) Construct a successful response with given object.
-
方法详细资料
-
ofSuccess
Construct a successful response with given object.- 类型参数:
T- type of the result- 参数:
result- result object- 返回:
- constructed server response
-
ofFailure
Construct a failed response with given exception.- 参数:
ex- cause of the failure- 返回:
- constructed server response
-
ofFailure
Construct a failed response with given exception.- 参数:
ex- cause of the failureresult- additional message of the failure- 返回:
- constructed server response
-
isSuccess
public boolean isSuccess() -
getResult
-
getException
-