use of org.mule.runtime.core.internal.execution.SourceResultAdapter in project mule by mulesoft.
the class DefaultSourceCallback method handle.
/**
* {@inheritDoc}
*/
@Override
public void handle(Result<T, A> result, SourceCallbackContext context) {
checkArgument(context instanceof SourceCallbackContextAdapter, "The supplied context was not created through this callback, " + "you naughty developer");
SourceCallbackContextAdapter contextAdapter = (SourceCallbackContextAdapter) context;
validateNotifications(contextAdapter);
MessageProcessContext messageProcessContext = processContextSupplier.get();
SourceResultAdapter resultAdapter = new SourceResultAdapter(result, cursorProviderFactory, defaultMediaType, returnsListOfMessages, context.getCorrelationId());
Message message = of(resultAdapter);
executeFlow(context, messageProcessContext, message);
contextAdapter.dispatched();
}
Aggregations