Mark ListenableFuture as deprecated for removal
Closes gh-33808
This commit is contained in:
@@ -118,7 +118,8 @@ public abstract class AbstractWebSocketClient implements WebSocketClient {
|
||||
* @return the established WebSocket session wrapped in a {@code ListenableFuture}.
|
||||
* @deprecated as of 6.0, in favor of {@link #executeInternal(WebSocketHandler, HttpHeaders, URI, List, List, Map)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
protected org.springframework.util.concurrent.ListenableFuture<WebSocketSession> doHandshakeInternal(
|
||||
WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> subProtocols,
|
||||
List<WebSocketExtension> extensions, Map<String, Object> attributes) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,9 +44,11 @@ public interface WebSocketClient {
|
||||
* @return a future that completes when the session is available
|
||||
* @deprecated as of 6.0, in favor of {@link #execute(WebSocketHandler, String, Object...)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
default org.springframework.util.concurrent.ListenableFuture<WebSocketSession> doHandshake(
|
||||
WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) {
|
||||
|
||||
return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>(
|
||||
execute(webSocketHandler, uriTemplate, uriVariables));
|
||||
}
|
||||
@@ -71,9 +73,11 @@ public interface WebSocketClient {
|
||||
* @return a future that completes when the session is available
|
||||
* @deprecated as of 6.0, in favor of {@link #execute(WebSocketHandler, WebSocketHttpHeaders, URI)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
default org.springframework.util.concurrent.ListenableFuture<WebSocketSession> doHandshake(
|
||||
WebSocketHandler webSocketHandler, @Nullable WebSocketHttpHeaders headers, URI uri) {
|
||||
|
||||
return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>(
|
||||
execute(webSocketHandler, headers, uri));
|
||||
}
|
||||
|
||||
@@ -237,7 +237,8 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
|
||||
* @return a {@code ListenableFuture} for access to the session when ready for use
|
||||
* @deprecated as of 6.0, in favor of {@link #connectAsync(String, StompSessionHandler, Object...)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public org.springframework.util.concurrent.ListenableFuture<StompSession> connect(
|
||||
String url, StompSessionHandler handler, Object... uriVars) {
|
||||
|
||||
@@ -270,7 +271,8 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
|
||||
* @return a {@code ListenableFuture} for access to the session when ready for use
|
||||
* @deprecated as of 6.0, in favor of {@link #connectAsync(String, WebSocketHttpHeaders, StompSessionHandler, Object...)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public org.springframework.util.concurrent.ListenableFuture<StompSession> connect(
|
||||
String url, @Nullable WebSocketHttpHeaders handshakeHeaders,
|
||||
StompSessionHandler handler, Object... uriVariables) {
|
||||
@@ -309,7 +311,8 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
|
||||
* @return a {@code ListenableFuture} for access to the session when ready for use
|
||||
* @deprecated as of 6.0, in favor of {@link #connectAsync(String, WebSocketHttpHeaders, StompHeaders, StompSessionHandler, Object...)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public org.springframework.util.concurrent.ListenableFuture<StompSession> connect(
|
||||
String url, @Nullable WebSocketHttpHeaders handshakeHeaders,
|
||||
@Nullable StompHeaders connectHeaders, StompSessionHandler handler, Object... uriVariables) {
|
||||
@@ -350,7 +353,8 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
|
||||
* @return a {@code ListenableFuture} for access to the session when ready for use
|
||||
* @deprecated as of 6.0, in favor of {@link #connectAsync(URI, WebSocketHttpHeaders, StompHeaders, StompSessionHandler)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public org.springframework.util.concurrent.ListenableFuture<StompSession> connect(
|
||||
URI url, @Nullable WebSocketHttpHeaders handshakeHeaders,
|
||||
@Nullable StompHeaders connectHeaders, StompSessionHandler sessionHandler) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -67,11 +67,13 @@ public abstract class AbstractClientSockJsSession implements WebSocketSession {
|
||||
@Nullable
|
||||
private volatile CloseStatus closeStatus;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code AbstractClientSockJsSession}.
|
||||
* @deprecated as of 6.0, in favor of {@link #AbstractClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
protected AbstractClientSockJsSession(TransportRequest request, WebSocketHandler handler,
|
||||
org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> connectFuture) {
|
||||
this(request, handler, connectFuture.completable());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -108,10 +108,12 @@ public abstract class AbstractXhrTransport implements XhrTransport {
|
||||
return connectFuture;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
protected void connectInternal(TransportRequest request, WebSocketHandler handler,
|
||||
URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session,
|
||||
org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> connectFuture) {
|
||||
|
||||
throw new UnsupportedOperationException("connectInternal has been deprecated in favor of connectInternal");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -146,7 +146,8 @@ class DefaultTransportRequest implements TransportRequest {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public void connect(WebSocketHandler handler,
|
||||
org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> future) {
|
||||
|
||||
@@ -207,7 +208,7 @@ class DefaultTransportRequest implements TransportRequest {
|
||||
* to connect. Also implements {@code Runnable} to handle a scheduled timeout
|
||||
* callback.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings("removal")
|
||||
private class ListenableConnectCallback implements
|
||||
org.springframework.util.concurrent.ListenableFutureCallback<WebSocketSession>, Runnable {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,9 +45,11 @@ public interface Transport {
|
||||
* @return a future to indicate success or failure to connect
|
||||
* @deprecated as of 6.0, in favor of {@link #connectAsync(TransportRequest, WebSocketHandler)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
default org.springframework.util.concurrent.ListenableFuture<WebSocketSession> connect(
|
||||
TransportRequest request, WebSocketHandler webSocketHandler) {
|
||||
|
||||
return new org.springframework.util.concurrent.CompletableToListenableFutureAdapter<>(
|
||||
connectAsync(request, webSocketHandler));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,11 +42,13 @@ public class WebSocketClientSockJsSession extends AbstractClientSockJsSession im
|
||||
@Nullable
|
||||
private WebSocketSession webSocketSession;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code WebSocketClientSockJsSession}.
|
||||
* @deprecated as of 6.0, in favor of {@link #WebSocketClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public WebSocketClientSockJsSession(TransportRequest request, WebSocketHandler handler,
|
||||
org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> connectFuture) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -54,12 +54,14 @@ public class XhrClientSockJsSession extends AbstractClientSockJsSession {
|
||||
|
||||
private int binaryMessageSizeLimit = -1;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code XhrClientSockJsSession}.
|
||||
* @deprecated as of 6.0, in favor of
|
||||
* {@link #XhrClientSockJsSession(TransportRequest, WebSocketHandler, XhrTransport, CompletableFuture)}
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
@SuppressWarnings("removal")
|
||||
public XhrClientSockJsSession(
|
||||
TransportRequest request, WebSocketHandler handler, XhrTransport transport,
|
||||
org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> connectFuture) {
|
||||
|
||||
Reference in New Issue
Block a user