Search in sources :

Example 1 with ListenableFutureReturnValueHandler

use of com.kixeye.chassis.transport.http.ListenableFutureReturnValueHandler in project chassis by Kixeye.

the class SpringMvcConfiguration method returnValueHandlers.

@Bean
public List<HandlerMethodReturnValueHandler> returnValueHandlers(RequestMappingHandlerAdapter requestMappingHandlerAdapter) {
    final List<HandlerMethodReturnValueHandler> handlers = new ArrayList<>(requestMappingHandlerAdapter.getReturnValueHandlers());
    handlers.add(0, new ObserableReturnValueHandler());
    handlers.add(0, new ListenableFutureReturnValueHandler());
    requestMappingHandlerAdapter.setReturnValueHandlers(handlers);
    return handlers;
}
Also used : HandlerMethodReturnValueHandler(org.springframework.web.method.support.HandlerMethodReturnValueHandler) ObserableReturnValueHandler(com.kixeye.chassis.transport.http.ObserableReturnValueHandler) ArrayList(java.util.ArrayList) ListenableFutureReturnValueHandler(com.kixeye.chassis.transport.http.ListenableFutureReturnValueHandler) Bean(org.springframework.context.annotation.Bean)

Aggregations

ListenableFutureReturnValueHandler (com.kixeye.chassis.transport.http.ListenableFutureReturnValueHandler)1 ObserableReturnValueHandler (com.kixeye.chassis.transport.http.ObserableReturnValueHandler)1 ArrayList (java.util.ArrayList)1 Bean (org.springframework.context.annotation.Bean)1 HandlerMethodReturnValueHandler (org.springframework.web.method.support.HandlerMethodReturnValueHandler)1