类 RpcResult
- java.lang.Object
-
- com.alibaba.dubbo.rpc.RpcResult
-
- 所有已实现的接口:
Result
,Serializable
- 直接已知子类:
DecodeableRpcResult
public class RpcResult extends Object implements Result, Serializable
RPC Result.- 另请参阅:
- 序列化表格
-
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 void
addAttachments(Map<String,String> map)
String
getAttachment(String key)
get attachment by key.String
getAttachment(String key, String defaultValue)
get attachment by key with default value.Map<String,String>
getAttachments()
get attachments.Throwable
getException()
Get exception.Object
getResult()
已过时。Replace to getValue()Object
getValue()
Get invoke result.boolean
hasException()
Has exception.Object
recreate()
Recreate.void
setAttachment(String key, String value)
void
setAttachments(Map<String,String> map)
Append all items from the map into the attachment, if map is empty then nothing happensvoid
setException(Throwable e)
void
setResult(Object result)
已过时。Replace to setValue()void
setValue(Object value)
String
toString()
-
-
-
方法详细资料
-
recreate
public Object recreate() throws Throwable
从接口复制的说明:Result
Recreate.if (hasException()) { throw getException(); } else { return getValue(); }
-
getResult
@Deprecated public Object getResult()
已过时。Replace to getValue()- 指定者:
getResult
在接口中Result
- 另请参阅:
getValue()
-
setResult
@Deprecated public void setResult(Object result)
已过时。Replace to setValue()- 另请参阅:
setValue(Object)
-
setValue
public void setValue(Object value)
-
getException
public Throwable getException()
从接口复制的说明:Result
Get exception.- 指定者:
getException
在接口中Result
- 返回:
- exception. if no exception return null.
-
setException
public void setException(Throwable e)
-
hasException
public boolean hasException()
从接口复制的说明:Result
Has exception.- 指定者:
hasException
在接口中Result
- 返回:
- has exception.
-
getAttachments
public Map<String,String> getAttachments()
从接口复制的说明:Result
get attachments.- 指定者:
getAttachments
在接口中Result
- 返回:
- attachments.
-
setAttachments
public void setAttachments(Map<String,String> map)
Append all items from the map into the attachment, if map is empty then nothing happens- 参数:
map
- contains all key-value pairs to append
-
getAttachment
public String getAttachment(String key)
从接口复制的说明:Result
get attachment by key.- 指定者:
getAttachment
在接口中Result
- 返回:
- attachment value.
-
getAttachment
public String getAttachment(String key, String defaultValue)
从接口复制的说明:Result
get attachment by key with default value.- 指定者:
getAttachment
在接口中Result
- 返回:
- attachment value.
-
-