Example usage for org.springframework.messaging.handler.invocation.reactive HandlerMethodReturnValueHandler handleReturnValue

List of usage examples for org.springframework.messaging.handler.invocation.reactive HandlerMethodReturnValueHandler handleReturnValue

Introduction

In this page you can find the example usage for org.springframework.messaging.handler.invocation.reactive HandlerMethodReturnValueHandler handleReturnValue.

Prototype

Mono<Void> handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message);

Source Link

Document

Handle the given return value.

Usage

From source file:org.springframework.messaging.handler.invocation.reactive.HandlerMethodReturnValueHandlerComposite.java

@Override
public Mono<Void> handleReturnValue(@Nullable Object returnValue, MethodParameter returnType,
        Message<?> message) {//  w ww. ja v  a 2 s .co m
    HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType);
    if (handler == null) {
        throw new IllegalStateException("No handler for return value type: " + returnType.getParameterType());
    }
    if (logger.isTraceEnabled()) {
        logger.trace("Processing return value with " + handler);
    }
    return handler.handleReturnValue(returnValue, returnType, message);
}