public static class Result.CompatibleResult extends Result.AbstractResult
Result.AbstractResult, Result.CompatibleResult| Constructor and Description |
|---|
CompatibleResult(Result result) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachments(Map<String,String> map)
Add the specified map to existing attachments in this instance.
|
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.
|
Result |
getDelegate() |
Throwable |
getException()
Get exception.
|
Object |
getValue()
Get invoke result.
|
boolean |
hasException()
Has exception.
|
Object |
recreate()
Recreate.
|
void |
setAttachment(String key,
Object value) |
void |
setAttachment(String key,
String value) |
void |
setAttachments(Map<String,String> map)
Replace the existing attachments with the specified param.
|
void |
setException(Throwable t) |
void |
setObjectAttachment(String key,
Object value) |
void |
setValue(Object value) |
get, get, thenApply, whenCompleteWithContextequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObjectAttachments, getObjectAttachment, getObjectAttachment, getObjectAttachments, setObjectAttachmentspublic CompatibleResult(Result result)
public Result getDelegate()
public Object getValue()
Resultpublic void setValue(Object value)
setValue in interface ResultsetValue in class Result.AbstractResultpublic Throwable getException()
Resultpublic void setException(Throwable t)
public boolean hasException()
Resultpublic Object recreate() throws Throwable
Result
if (hasException()) {
throw getException();
} else {
return getValue();
}
Throwablepublic Map<String,String> getAttachments()
Resultpublic void addAttachments(Map<String,String> map)
Resultpublic void setAttachments(Map<String,String> map)
Resultpublic String getAttachment(String key)
Resultpublic String getAttachment(String key, String defaultValue)
ResultCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.