Java Examples for reactor.core.publisher.Mono.fromCallable

The following java examples will help you to understand the usage of reactor.core.publisher.Mono.fromCallable. These source code samples are taken from different open source projects.

Example 1
Project: MULE-master  File: OperationMessageProcessor.java View source code
protected Mono<Event> doProcess(Event event, ExecutionContextAdapter<OperationModel> operationContext) {
    return executeOperation(operationContext).map( value -> returnDelegate.asReturnValue(value, operationContext)).switchIfEmpty(fromCallable(() -> returnDelegate.asReturnValue(null, operationContext))).onErrorMap(Exceptions::unwrap);
}