@Override public boolean supportsReturnType(MethodParameter returnType) { return getReturnValueHandler(returnType) != null; }
@Override public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message) throws Exception { 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); } handler.handleReturnValue(returnValue, returnType, message); }
@Override @Nullable public ListenableFuture<?> toListenableFuture(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); Assert.state(handler instanceof AsyncHandlerMethodReturnValueHandler, "AsyncHandlerMethodReturnValueHandler required"); return ((AsyncHandlerMethodReturnValueHandler) handler).toListenableFuture(returnValue, returnType); }
@Override public boolean isAsyncReturnValue(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); return (handler instanceof AsyncHandlerMethodReturnValueHandler && ((AsyncHandlerMethodReturnValueHandler) handler).isAsyncReturnValue(returnValue, returnType)); }
@Override public boolean supportsReturnType(MethodParameter returnType) { return getReturnValueHandler(returnType) != null; }
@Override public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message) throws Exception { 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); } handler.handleReturnValue(returnValue, returnType, message); }
@Override public boolean isAsyncReturnValue(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); return (handler instanceof AsyncHandlerMethodReturnValueHandler && ((AsyncHandlerMethodReturnValueHandler) handler).isAsyncReturnValue(returnValue, returnType)); }
@Override @Nullable public ListenableFuture<?> toListenableFuture(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); Assert.state(handler instanceof AsyncHandlerMethodReturnValueHandler, "AsyncHandlerMethodReturnValueHandler required"); return ((AsyncHandlerMethodReturnValueHandler) handler).toListenableFuture(returnValue, returnType); }
@Override public boolean supportsReturnType(MethodParameter returnType) { return getReturnValueHandler(returnType) != null; }
@Override public boolean supportsReturnType(MethodParameter returnType) { return getReturnValueHandler(returnType) != null; }
@Override public boolean isAsyncReturnValue(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); return (handler instanceof AsyncHandlerMethodReturnValueHandler && ((AsyncHandlerMethodReturnValueHandler) handler).isAsyncReturnValue(returnValue, returnType)); }
@Override @Nullable public ListenableFuture<?> toListenableFuture(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); Assert.state(handler instanceof AsyncHandlerMethodReturnValueHandler, "AsyncHandlerMethodReturnValueHandler required"); return ((AsyncHandlerMethodReturnValueHandler) handler).toListenableFuture(returnValue, returnType); }
@Override public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message) throws Exception { 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); } handler.handleReturnValue(returnValue, returnType, message); }
@Override @Nullable public ListenableFuture<?> toListenableFuture(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); Assert.state(handler instanceof AsyncHandlerMethodReturnValueHandler, "AsyncHandlerMethodReturnValueHandler required"); return ((AsyncHandlerMethodReturnValueHandler) handler).toListenableFuture(returnValue, returnType); }
@Override public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message) throws Exception { 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); } handler.handleReturnValue(returnValue, returnType, message); }
@Override public boolean isAsyncReturnValue(Object returnValue, MethodParameter returnType) { HandlerMethodReturnValueHandler handler = getReturnValueHandler(returnType); return (handler instanceof AsyncHandlerMethodReturnValueHandler && ((AsyncHandlerMethodReturnValueHandler) handler).isAsyncReturnValue(returnValue, returnType)); }