use of org.mule.runtime.extension.api.runtime.process.VoidCompletionCallback in project mule by mulesoft.
the class VoidCallbackArgumentResolver method resolve.
@Override
public LazyValue<VoidCompletionCallback> resolve(ExecutionContext executionContext) {
return new LazyValue<>(() -> {
ExecutionContextAdapter adapter = (ExecutionContextAdapter) executionContext;
CompletionCallback completionCallback = (CompletionCallback) adapter.getVariable(COMPLETION_CALLBACK_CONTEXT_PARAM);
final CoreEvent event = adapter.getEvent();
return new VoidCompletionCallback() {
@Override
public void success() {
completionCallback.success(EventedResult.from(event));
}
@Override
public void error(Throwable e) {
completionCallback.error(e);
}
};
});
}
Aggregations