public class CursorResetInterceptor extends Object implements org.mule.runtime.extension.api.runtime.operation.Interceptor<org.mule.runtime.api.meta.model.operation.OperationModel>
cursors that were resolved as parameters of a given operation execution and the
position they were in before the execution.
If the operation fails with a ConnectionException, then the SDK will attempt to reconnect. This interceptor makes sure
that all those cursors are set back on their original positions before the retry is attempted, since otherwise, the stream
would be corrupted and the repeatable promise broken.| Modifier and Type | Field and Description |
|---|---|
static String |
CURSOR_RESET_HANDLER_VARIABLE |
| Constructor and Description |
|---|
CursorResetInterceptor(Map<org.mule.runtime.api.meta.model.parameter.ParameterGroupModel,Set<org.mule.runtime.api.meta.model.parameter.ParameterModel>> cursorParametersMap,
ReflectionCache reflectionCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
before(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> ctx) |
Throwable |
onError(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext,
Throwable exception) |
public static final String CURSOR_RESET_HANDLER_VARIABLE
public CursorResetInterceptor(Map<org.mule.runtime.api.meta.model.parameter.ParameterGroupModel,Set<org.mule.runtime.api.meta.model.parameter.ParameterModel>> cursorParametersMap, ReflectionCache reflectionCache)
public void before(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> ctx)
throws Exception
before in interface org.mule.runtime.extension.api.runtime.operation.Interceptor<org.mule.runtime.api.meta.model.operation.OperationModel>Exceptionpublic Throwable onError(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext, Throwable exception)
onError in interface org.mule.runtime.extension.api.runtime.operation.Interceptor<org.mule.runtime.api.meta.model.operation.OperationModel>Copyright © 2003–2024 MuleSoft, Inc.. All rights reserved.