类 Result.CompatibleResult
- java.lang.Object
-
- com.alibaba.dubbo.rpc.Result.AbstractResult
-
- com.alibaba.dubbo.rpc.Result.CompatibleResult
-
- 所有已实现的接口:
Result,Serializable,Result
- 封闭接口:
- Result
public static class Result.CompatibleResult extends Result.AbstractResult
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 com.alibaba.dubbo.rpc.Result
Result.AbstractResult, Result.CompatibleResult
-
-
构造器概要
构造器 构造器 说明 CompatibleResult(Result result)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddAttachments(Map<String,String> map)Add the specified map to existing attachments in this instance.StringgetAttachment(String key)get attachment by key.StringgetAttachment(String key, String defaultValue)get attachment by key with default value.Map<String,String>getAttachments()get attachments.ResultgetDelegate()ThrowablegetException()Get exception.ObjectgetValue()Get invoke result.booleanhasException()Has exception.Objectrecreate()Recreate.voidsetAttachment(String key, Object value)voidsetAttachment(String key, String value)voidsetAttachments(Map<String,String> map)Replace the existing attachments with the specified param.voidsetException(Throwable t)voidsetObjectAttachment(String key, Object value)voidsetValue(Object value)-
从类继承的方法 com.alibaba.dubbo.rpc.Result.AbstractResult
get, get, thenApply, whenCompleteWithContext
-
从接口继承的方法 com.alibaba.dubbo.rpc.Result
addObjectAttachments, getObjectAttachment, getObjectAttachment, getObjectAttachments, setObjectAttachments
-
-
-
-
构造器详细资料
-
CompatibleResult
public CompatibleResult(Result result)
-
-
方法详细资料
-
getDelegate
public Result getDelegate()
-
getValue
public Object getValue()
从接口复制的说明:ResultGet invoke result.- 返回:
- result. if no result return null.
-
setValue
public void setValue(Object value)
-
getException
public Throwable getException()
从接口复制的说明:ResultGet exception.- 返回:
- exception. if no exception return null.
-
setException
public void setException(Throwable t)
-
hasException
public boolean hasException()
从接口复制的说明:ResultHas exception.- 返回:
- has exception.
-
recreate
public Object recreate() throws Throwable
从接口复制的说明:ResultRecreate.if (hasException()) { throw getException(); } else { return getValue(); }- 返回:
- result.
- 抛出:
Throwable
-
getAttachments
public Map<String,String> getAttachments()
从接口复制的说明:Resultget attachments.- 返回:
- attachments.
-
addAttachments
public void addAttachments(Map<String,String> map)
从接口复制的说明:ResultAdd the specified map to existing attachments in this instance.
-
setAttachments
public void setAttachments(Map<String,String> map)
从接口复制的说明:ResultReplace the existing attachments with the specified param.
-
getAttachment
public String getAttachment(String key)
从接口复制的说明:Resultget attachment by key.- 返回:
- attachment value.
-
getAttachment
public String getAttachment(String key, String defaultValue)
从接口复制的说明:Resultget attachment by key with default value.- 返回:
- attachment value.
-
-