public final class ConnectionInterceptor extends Object implements org.mule.runtime.extension.api.runtime.operation.Interceptor<org.mule.runtime.api.meta.model.ComponentModel>
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.ComponentModel> executionContext,
Object result)
Closes the connection according to the command set through
setCloseCommand(ExecutionContext, Runnable). |
void |
before(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.ComponentModel> 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<org.mule.runtime.api.meta.model.ComponentModel> executionContext,
Throwable exception) |
public void before(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.ComponentModel> 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.Interceptor<org.mule.runtime.api.meta.model.ComponentModel>executionContext - the ExecutionContext for the operation to be executedIllegalArgumentException - if the operationContext already contains a parameter of key
ExtensionProperties.CONNECTION_PARAMExceptionpublic Throwable onError(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.ComponentModel> executionContext, Throwable exception)
onError in interface org.mule.runtime.extension.api.runtime.operation.Interceptor<org.mule.runtime.api.meta.model.ComponentModel>public void after(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.ComponentModel> executionContext,
Object result)
setCloseCommand(ExecutionContext, Runnable).
Interception API requires the connection to be closed at this point so that it's available across the entire
interception cycle.after in interface org.mule.runtime.extension.api.runtime.operation.Interceptor<org.mule.runtime.api.meta.model.ComponentModel>Copyright © 2003–2024 MuleSoft, Inc.. All rights reserved.