public class FutureRetryContext extends Object implements RetryContext
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.FAILED_DISPATCHER, FAILED_RECEIVER, FAILED_REQUESTER| Constructor and Description |
|---|
FutureRetryContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addReturnMessage(org.mule.runtime.api.message.Message result) |
protected void |
checkState() |
String |
getDescription() |
org.mule.runtime.api.message.Message |
getFirstReturnMessage() |
Throwable |
getLastFailure()
The most recent failure which prevented the context from validating the connection.
|
Map<Object,Object> |
getMetaInfo() |
MuleContext |
getMuleContext() |
org.mule.runtime.api.message.Message[] |
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(org.mule.runtime.api.message.Message[] returnMessages) |
public boolean isReady()
protected void checkState()
public void addReturnMessage(org.mule.runtime.api.message.Message result)
addReturnMessage in interface RetryContextpublic String getDescription()
getDescription in interface RetryContextpublic org.mule.runtime.api.message.Message getFirstReturnMessage()
getFirstReturnMessage in interface RetryContextpublic Map<Object,Object> getMetaInfo()
getMetaInfo in interface RetryContextpublic org.mule.runtime.api.message.Message[] getReturnMessages()
getReturnMessages in interface RetryContextpublic void setReturnMessages(org.mule.runtime.api.message.Message[] returnMessages)
setReturnMessages in interface RetryContextpublic Throwable getLastFailure()
RetryContextRetryContext.isOk() should be consulted first.getLastFailure in interface RetryContextpublic void setOk()
RetryContextsetOk in interface RetryContextpublic void setFailed(Throwable lastFailure)
RetryContextsetFailed in interface RetryContextlastFailure - the most recent failure, can be nullpublic boolean isOk()
RetryContextRetryContext.getLastFailure() may return null.isOk in interface RetryContextpublic MuleContext getMuleContext()
getMuleContext in interface RetryContextCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.