public class DefaultRetryContext extends Object implements RetryContext, MuleContextAware
FAILED_DISPATCHER, FAILED_RECEIVER, FAILED_REQUESTER
Constructor and Description |
---|
DefaultRetryContext(String description,
Map<Object,Object> metaInfo) |
Modifier and Type | Method and Description |
---|---|
void |
addReturnMessage(MuleMessage result) |
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. |
void |
setFailed(Throwable lastFailure)
Typically called by validation logic to mark a problem and an optional root cause.
|
void |
setMuleContext(MuleContext context) |
void |
setOk()
Typically called by validation logic to mark no problems with the current connection.
|
void |
setReturnMessages(MuleMessage[] returnMessages) |
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public MuleContext getMuleContext()
getMuleContext
in interface RetryContext
public Map<Object,Object> getMetaInfo()
getMetaInfo
in interface RetryContext
public MuleMessage[] getReturnMessages()
getReturnMessages
in interface RetryContext
public MuleMessage getFirstReturnMessage()
getFirstReturnMessage
in interface RetryContext
public void setReturnMessages(MuleMessage[] returnMessages)
setReturnMessages
in interface RetryContext
public void addReturnMessage(MuleMessage result)
addReturnMessage
in interface RetryContext
public String getDescription()
getDescription
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 boolean isOk()
RetryContext
RetryContext.getLastFailure()
may return null.isOk
in interface RetryContext
public void setFailed(Throwable lastFailure)
RetryContext
setFailed
in interface RetryContext
lastFailure
- the most recent failure, can be nullCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.