public final class ConnectionInterceptor extends Object implements org.mule.runtime.extension.api.runtime.operation.Interceptor
before(ExecutionContext) phase to set a connection as parameter
value of key ExtensionProperties.CONNECTION_PARAM into an ExecutionContext.| Constructor and Description |
|---|
ConnectionInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
after(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext,
Object result)
|
void |
before(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext)
Adds a
Connection as a parameter in the operationContext, following the considerations in this type's
javadoc. |
Throwable |
onError(org.mule.runtime.extension.api.runtime.operation.ExecutionContext executionContext,
org.mule.runtime.extension.api.runtime.RetryRequest retryRequest,
Throwable exception)
If the
exception is a ConnectionException a retry of failed request will be asked |
public void before(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext)
throws Exception
Connection as a parameter in the operationContext, following the considerations in this type's
javadoc.before in interface org.mule.runtime.extension.api.runtime.operation.InterceptorexecutionContext - the ExecutionContext for the operation to be executedIllegalArgumentException - if the operationContext already contains a parameter of key
ExtensionProperties.CONNECTION_PARAMExceptionpublic void after(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext,
Object result)
after in interface org.mule.runtime.extension.api.runtime.operation.InterceptorexecutionContext - the ExecutionContext that was used to execute the operationresult - the operation's resultpublic Throwable onError(org.mule.runtime.extension.api.runtime.operation.ExecutionContext executionContext, org.mule.runtime.extension.api.runtime.RetryRequest retryRequest, Throwable exception)
exception is a ConnectionException a retry of failed request will be askedonError in interface org.mule.runtime.extension.api.runtime.operation.InterceptorexecutionContext - the ExecutionContext that was used to execute the operationretryRequest - a RetryRequest in case that the operation should be retriedexception - the Exception that was thrown by the failing operationThrowable given in the parameterCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.