Deprecations related to reactive type support in 5.0
Issue: SPR-15365
This commit is contained in:
@@ -23,7 +23,14 @@ import org.springframework.web.context.request.async.DeferredResult;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3
|
||||
*
|
||||
* @deprecated in 4.3.8 since 5.0 adds first-class support for reactive type
|
||||
* return values from Spring MVC controller methods based on the pluggable
|
||||
* {@code ReactiveAdapterRegistry} mechanism. Yet another alternative would
|
||||
* be to implement a custom
|
||||
* {@link org.springframework.web.method.support.AsyncHandlerMethodReturnValueHandler}.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface DeferredResultAdapter {
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.2
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class DeferredResultMethodReturnValueHandler implements AsyncHandlerMethodReturnValueHandler {
|
||||
|
||||
private final Map<Class<?>, DeferredResultAdapter> adapterMap;
|
||||
@@ -61,7 +62,9 @@ public class DeferredResultMethodReturnValueHandler implements AsyncHandlerMetho
|
||||
* <p>By default the map contains adapters for {@code DeferredResult}, which
|
||||
* simply downcasts, {@link ListenableFuture}, and {@link CompletionStage}.
|
||||
* @return the map of adapters
|
||||
* @deprecated in 4.3.8, see comments on {@link DeferredResultAdapter}
|
||||
*/
|
||||
@Deprecated
|
||||
public Map<Class<?>, DeferredResultAdapter> getAdapterMap() {
|
||||
return this.adapterMap;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,12 @@ import org.springframework.http.server.ServerHttpResponse;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3
|
||||
*
|
||||
* @deprecated in 4.3.8 since 5.0 adds first-class support for reactive type
|
||||
* return values from Spring MVC controller methods based on the pluggable
|
||||
* {@code ReactiveAdapterRegistry} mechanism.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ResponseBodyEmitterAdapter {
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,6 +52,7 @@ import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.2
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ResponseBodyEmitterReturnValueHandler implements AsyncHandlerMethodReturnValueHandler {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(ResponseBodyEmitterReturnValueHandler.class);
|
||||
@@ -75,7 +76,9 @@ public class ResponseBodyEmitterReturnValueHandler implements AsyncHandlerMethod
|
||||
* By default the map contains a single adapter {@code ResponseBodyEmitter}
|
||||
* that simply downcasts the return value.
|
||||
* @return the map of adapters
|
||||
* @deprecated in 4.3.8, see comments on {@link ResponseBodyEmitterAdapter}
|
||||
*/
|
||||
@Deprecated
|
||||
public Map<Class<?>, ResponseBodyEmitterAdapter> getAdapterMap() {
|
||||
return this.adapterMap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user