|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alibaba.dubbo.rpc.RpcResult
public class RpcResult
RPC Result.
Constructor Summary | |
---|---|
RpcResult()
|
|
RpcResult(Object result)
|
|
RpcResult(Throwable exception)
|
Method Summary | |
---|---|
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()
Deprecated. 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)
|
void |
setException(Throwable e)
|
void |
setResult(Object result)
Deprecated. Replace to setValue() |
void |
setValue(Object value)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RpcResult()
public RpcResult(Object result)
public RpcResult(Throwable exception)
Method Detail |
---|
public Object recreate() throws Throwable
Result
if (hasException()) {
throw getException();
} else {
return getValue();
}
recreate
in interface Result
Throwable
@Deprecated public Object getResult()
getResult
in interface Result
getValue()
@Deprecated public void setResult(Object result)
com.alibaba.dubbo.rpc.RpcResult#setValue()
public Object getValue()
Result
getValue
in interface Result
public void setValue(Object value)
public Throwable getException()
Result
getException
in interface Result
public void setException(Throwable e)
public boolean hasException()
Result
hasException
in interface Result
public Map<String,String> getAttachments()
Result
getAttachments
in interface Result
public void setAttachments(Map<String,String> map)
public String getAttachment(String key)
Result
getAttachment
in interface Result
public String getAttachment(String key, String defaultValue)
Result
getAttachment
in interface Result
public void setAttachment(String key, String value)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |