use of org.mule.runtime.extension.api.runtime.source.BackPressureAction in project mule by mulesoft.
the class BackPressureContextArgumentResolver method resolve.
@Override
public LazyValue<BackPressureContext> resolve(ExecutionContext executionContext) {
return new LazyValue<>(() -> {
ExecutionContextAdapter ctx = (ExecutionContextAdapter) executionContext;
BackPressureAction action = (BackPressureAction) ctx.getVariable(BACK_PRESSURE_ACTION_CONTEXT_PARAM);
if (action == null) {
action = FAIL;
}
return new ImmutableBackPressureContext(ctx.getEvent(), action, callbackContextResolver.resolve(ctx).get());
});
}
Aggregations