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

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

Introduction

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

Prototype

boolean supportsReturnType(MethodParameter returnType);

Source Link

Document

Whether the given MethodParameter method return type is supported by this handler.

Usage

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

@SuppressWarnings("ForLoopReplaceableByForEach")
@Nullable//w w w. ja  v  a  2  s. co m
private HandlerMethodReturnValueHandler getReturnValueHandler(MethodParameter returnType) {
    for (int i = 0; i < this.returnValueHandlers.size(); i++) {
        HandlerMethodReturnValueHandler handler = this.returnValueHandlers.get(i);
        if (handler.supportsReturnType(returnType)) {
            return handler;
        }
    }
    return null;
}