|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.retry.async.FutureRetryContext
public class FutureRetryContext
An implementation of RetryContext
to be used when a RetryPolicyTemplate
is
executed in a separate thread via the AsynchronousRetryTemplate
. A FutureRetryContext is a proxy to a real
RetryContext
and provides access to the real context once it becomes available.
Field Summary |
---|
Fields inherited from interface org.mule.api.retry.RetryContext |
---|
FAILED_DISPATCHER, FAILED_RECEIVER, FAILED_REQUESTER |
Constructor Summary | |
---|---|
FutureRetryContext()
|
Method Summary | |
---|---|
void |
addReturnMessage(MuleMessage result)
|
protected void |
checkState()
|
String |
getDescription()
|
MuleMessage |
getFirstReturnMessage()
|
Throwable |
getLastFailure()
The most recent failure which prevented the context from validating the connection. |
Map<Object,Object> |
getMetaInfo()
|
MuleContext |
getMuleContext()
|
MuleMessage[] |
getReturnMessages()
|
boolean |
isOk()
Note that it's possible for an implementation to return false and have no failure specified, thus the subsequent RetryContext.getLastFailure() may return null. |
boolean |
isReady()
|
void |
setFailed(Throwable lastFailure)
Typically called by validation logic to mark a problem and an optional root cause. |
void |
setOk()
Typically called by validation logic to mark no problems with the current connection. |
void |
setReturnMessages(MuleMessage[] returnMessages)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FutureRetryContext()
Method Detail |
---|
public boolean isReady()
protected void checkState()
public void addReturnMessage(MuleMessage result)
addReturnMessage
in interface RetryContext
public String getDescription()
getDescription
in interface RetryContext
public MuleMessage getFirstReturnMessage()
getFirstReturnMessage
in interface RetryContext
public Map<Object,Object> getMetaInfo()
getMetaInfo
in interface RetryContext
public MuleMessage[] getReturnMessages()
getReturnMessages
in interface RetryContext
public void setReturnMessages(MuleMessage[] returnMessages)
setReturnMessages
in interface RetryContext
public Throwable getLastFailure()
RetryContext
RetryContext.isOk()
should be consulted first.
getLastFailure
in interface RetryContext
public void setOk()
RetryContext
setOk
in interface RetryContext
public void setFailed(Throwable lastFailure)
RetryContext
setFailed
in interface RetryContext
lastFailure
- the most recent failure, can be nullpublic boolean isOk()
RetryContext
RetryContext.getLastFailure()
may return null.
isOk
in interface RetryContext
public MuleContext getMuleContext()
getMuleContext
in interface RetryContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |