public class ResponseBodyEmitterReturnValueHandler extends Object implements org.springframework.web.method.support.AsyncHandlerMethodReturnValueHandler
ResponseBodyEmitter
(and the
ResponseEntity<ResponseBodyEmitter>
sub-class) as well as any other
async type with a registered adapter
.Constructor and Description |
---|
ResponseBodyEmitterReturnValueHandler(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters) |
Modifier and Type | Method and Description |
---|---|
Map<Class<?>,ResponseBodyEmitterAdapter> |
getAdapterMap()
Return the map with
ResponseBodyEmitter adapters. |
void |
handleReturnValue(Object returnValue,
org.springframework.core.MethodParameter returnType,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest) |
boolean |
isAsyncReturnValue(Object returnValue,
org.springframework.core.MethodParameter returnType) |
boolean |
supportsReturnType(org.springframework.core.MethodParameter returnType) |
public ResponseBodyEmitterReturnValueHandler(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
public Map<Class<?>,ResponseBodyEmitterAdapter> getAdapterMap()
ResponseBodyEmitter
adapters.
By default the map contains a single adapter ResponseBodyEmitter
that simply downcasts the return value.public boolean supportsReturnType(org.springframework.core.MethodParameter returnType)
supportsReturnType
in interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
public boolean isAsyncReturnValue(Object returnValue, org.springframework.core.MethodParameter returnType)
isAsyncReturnValue
in interface org.springframework.web.method.support.AsyncHandlerMethodReturnValueHandler
public void handleReturnValue(Object returnValue, org.springframework.core.MethodParameter returnType, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest) throws Exception
handleReturnValue
in interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
Exception