Polishing

(cherry picked from commit edf7f3cd43)
This commit is contained in:
Juergen Hoeller
2024-12-04 16:41:07 +01:00
parent 3635ff0c17
commit aaf2e8fbe6
10 changed files with 29 additions and 36 deletions

View File

@@ -34,12 +34,10 @@ import org.springframework.web.socket.WebSocketExtension;
*/
public class StandardToWebSocketExtensionAdapter extends WebSocketExtension {
public StandardToWebSocketExtensionAdapter(Extension extension) {
super(extension.getName(), initParameters(extension));
}
private static Map<String, String> initParameters(Extension extension) {
List<Extension.Parameter> parameters = extension.getParameters();
Map<String, String> result = new LinkedCaseInsensitiveMap<>(parameters.size(), Locale.ROOT);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 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.
@@ -55,6 +55,7 @@ public class WebSocketToStandardExtensionAdapter implements Extension {
}
}
@Override
public String getName() {
return this.name;

View File

@@ -234,7 +234,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
/**
* An overloaded version of
* {@link #connect(String, StompSessionHandler, Object...)} that also
* {@link #connectAsync(String, StompSessionHandler, Object...)} that also
* accepts {@link WebSocketHttpHeaders} to use for the WebSocket handshake.
* @param url the url to connect to
* @param handshakeHeaders the headers for the WebSocket handshake
@@ -254,7 +254,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
/**
* An overloaded version of
* {@link #connect(String, StompSessionHandler, Object...)} that also
* {@link #connectAsync(String, StompSessionHandler, Object...)} that also
* accepts {@link WebSocketHttpHeaders} to use for the WebSocket handshake.
* @param url the url to connect to
* @param handshakeHeaders the headers for the WebSocket handshake
@@ -271,7 +271,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
/**
* An overloaded version of
* {@link #connect(String, StompSessionHandler, Object...)} that also accepts
* {@link #connectAsync(String, StompSessionHandler, Object...)} that also accepts
* {@link WebSocketHttpHeaders} to use for the WebSocket handshake and
* {@link StompHeaders} for the STOMP CONNECT frame.
* @param url the url to connect to
@@ -293,7 +293,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
/**
* An overloaded version of
* {@link #connect(String, StompSessionHandler, Object...)} that also accepts
* {@link #connectAsync(String, StompSessionHandler, Object...)} that also accepts
* {@link WebSocketHttpHeaders} to use for the WebSocket handshake and
* {@link StompHeaders} for the STOMP CONNECT frame.
* @param url the url to connect to
@@ -314,7 +314,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
/**
* An overloaded version of
* {@link #connect(String, WebSocketHttpHeaders, StompSessionHandler, Object...)}
* {@link #connectAsync(String, WebSocketHttpHeaders, StompSessionHandler, Object...)}
* that accepts a fully prepared {@link java.net.URI}.
* @param url the url to connect to
* @param handshakeHeaders the headers for the WebSocket handshake
@@ -334,7 +334,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
/**
* An overloaded version of
* {@link #connect(String, WebSocketHttpHeaders, StompSessionHandler, Object...)}
* {@link #connectAsync(String, WebSocketHttpHeaders, StompSessionHandler, Object...)}
* that accepts a fully prepared {@link java.net.URI}.
* @param url the url to connect to
* @param handshakeHeaders the headers for the WebSocket handshake

View File

@@ -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.
@@ -278,6 +278,7 @@ class DefaultTransportRequest implements TransportRequest {
}
}
/**
* Updates the given (global) future based success or failure to connect for
* the entire SockJS request regardless of which transport actually managed