Example usage for org.springframework.web.reactive HandlerResult getReturnValue

List of usage examples for org.springframework.web.reactive HandlerResult getReturnValue

Introduction

In this page you can find the example usage for org.springframework.web.reactive HandlerResult getReturnValue.

Prototype

@Nullable
public Object getReturnValue() 

Source Link

Document

Return the value returned from the handler, if any.

Usage

From source file:org.springframework.web.reactive.DispatcherHandler.java

private HandlerResultHandler getResultHandler(HandlerResult handlerResult) {
    if (this.resultHandlers != null) {
        for (HandlerResultHandler resultHandler : this.resultHandlers) {
            if (resultHandler.supports(handlerResult)) {
                return resultHandler;
            }/*  www  .jav  a2  s. co m*/
        }
    }
    throw new IllegalStateException("No HandlerResultHandler for " + handlerResult.getReturnValue());
}

From source file:org.springframework.web.reactive.result.HandlerResultHandlerSupport.java

/**
 * Get a {@code ReactiveAdapter} for the top-level return value type.
 * @return the matching adapter or {@code null}
 *///w w w  .j a v a  2 s . co m
@Nullable
protected ReactiveAdapter getAdapter(HandlerResult result) {
    Class<?> returnType = result.getReturnType().getRawClass();
    return getAdapterRegistry().getAdapter(returnType, result.getReturnValue());
}