Browse Source

Fix recent javadoc errors

Issue: SPR-17174
pull/1946/head
Juergen Hoeller 7 years ago
parent
commit
92228f9e64
  1. 6
      spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java
  2. 18
      spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyTcpClient.java
  3. 21
      spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java
  4. 9
      spring-web/src/main/java/org/springframework/http/client/OkHttp3ClientHttpRequestFactory.java
  5. 4
      spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java
  6. 10
      spring-web/src/main/java/org/springframework/http/converter/protobuf/ProtobufJsonFormatHttpMessageConverter.java
  7. 10
      spring-web/src/main/java/org/springframework/http/server/reactive/HttpHandler.java
  8. 7
      spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java
  9. 16
      spring-web/src/main/java/org/springframework/web/client/ExtractingResponseErrorHandler.java
  10. 4
      spring-web/src/main/java/org/springframework/web/client/RestOperations.java
  11. 32
      spring-web/src/main/java/org/springframework/web/client/RestTemplate.java
  12. 10
      spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java
  13. 4
      spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/ReactorNettyWebSocketClient.java
  14. 20
      spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/UndertowWebSocketClient.java
  15. 4
      spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java

6
spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java

@ -347,9 +347,9 @@ public class ResourceBundleMessageSource extends AbstractResourceBasedMessageSou @@ -347,9 +347,9 @@ public class ResourceBundleMessageSource extends AbstractResourceBasedMessageSou
/**
* Custom implementation of Java 6's {@code ResourceBundle.Control},
* adding support for custom file encodings, deactivating the fallback to the
* system locale and activating ResourceBundle's native cache, if desired.
* Custom implementation of {@code ResourceBundle.Control}, adding support
* for custom file encodings, deactivating the fallback to the system locale
* and activating ResourceBundle's native cache, if desired.
*/
private class MessageSourceControl extends ResourceBundle.Control {

18
spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyTcpClient.java

@ -102,27 +102,24 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> { @@ -102,27 +102,24 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
}
/**
* Constructor with a {@link ClientOptions.Builder} that can be used to
* Constructor with a {@code ClientOptions.Builder} that can be used to
* customize Reactor Netty client options.
*
* <p><strong>Note: </strong> this constructor manages the lifecycle of the
* {@link TcpClient} and its underlying resources. Please do not customize
* any of the following options:
* {@link ClientOptions.Builder#channelGroup(ChannelGroup) ChannelGroup},
* {@link ClientOptions.Builder#loopResources(LoopResources) LoopResources}, and
* {@link ClientOptions.Builder#poolResources(PoolResources) PoolResources}.
* You may set the {@link ClientOptions.Builder#disablePool() disablePool}
* {@code ClientOptions.Builder#channelGroup(ChannelGroup) ChannelGroup},
* {@code ClientOptions.Builder#loopResources(LoopResources) LoopResources}, and
* {@code ClientOptions.Builder#poolResources(PoolResources) PoolResources}.
* You may set the {@code ClientOptions.Builder#disablePool() disablePool}
* option if you simply want to turn off pooling.
*
* <p>For full control over the initialization and lifecycle of the TcpClient,
* see {@link #ReactorNettyTcpClient(TcpClient, ReactorNettyCodec)}.
*
* @param optionsConsumer consumer to customize client options
* @param codec the code to use
* @see org.springframework.messaging.simp.stomp.StompReactorNettyCodec
*/
public ReactorNettyTcpClient(Consumer<ClientOptions.Builder<?>> optionsConsumer,
ReactorNettyCodec<P> codec) {
public ReactorNettyTcpClient(
Consumer<ClientOptions.Builder<?>> optionsConsumer, ReactorNettyCodec<P> codec) {
Assert.notNull(optionsConsumer, "Consumer<ClientOptions.Builder<?> is required");
Assert.notNull(codec, "ReactorNettyCodec is required");
@ -155,7 +152,6 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> { @@ -155,7 +152,6 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
/**
* Constructor with an externally created {@link TcpClient} instance whose
* lifecycle is expected to be managed externally.
*
* @param tcpClient the TcpClient instance to use
* @param codec the code to use
* @see org.springframework.messaging.simp.stomp.StompReactorNettyCodec

21
spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java

@ -359,8 +359,10 @@ public interface WebTestClient { @@ -359,8 +359,10 @@ public interface WebTestClient {
/**
* Steps for customizing the {@link WebClient} used to test with
* internally delegating to a {@link WebClient.Builder}.
* Steps for customizing the {@link WebClient} used to test with,
* internally delegating to a
* {@link org.springframework.web.reactive.function.client.WebClient.Builder
* WebClient.Builder}.
*/
interface Builder {
@ -443,7 +445,8 @@ public interface WebTestClient { @@ -443,7 +445,8 @@ public interface WebTestClient {
Builder responseTimeout(Duration timeout);
/**
* Shortcut for pre-packaged customizations to WebTestClient builder.
* Apply the given configurer to this builder instance.
* <p>This can be useful for applying pre-packaged customizations.
* @param configurer the configurer to apply
*/
Builder apply(WebTestClientConfigurer configurer);
@ -591,6 +594,9 @@ public interface WebTestClient { @@ -591,6 +594,9 @@ public interface WebTestClient {
}
/**
* Specification for providing body of a request.
*/
interface RequestBodySpec extends RequestHeadersSpec<RequestBodySpec> {
/**
* Set the length of the body in bytes, as specified by the
@ -649,10 +655,15 @@ public interface WebTestClient { @@ -649,10 +655,15 @@ public interface WebTestClient {
}
/**
* Specification for providing request headers and the URI of a request.
*/
interface RequestHeadersUriSpec<S extends RequestHeadersSpec<S>> extends UriSpec<S>, RequestHeadersSpec<S> {
}
/**
* Specification for providing the body and the URI of a request.
*/
interface RequestBodyUriSpec extends RequestBodySpec, RequestHeadersUriSpec<RequestBodySpec> {
}
@ -792,7 +803,7 @@ public interface WebTestClient { @@ -792,7 +803,7 @@ public interface WebTestClient {
* Parse the expected and actual response content as JSON and perform a
* "lenient" comparison verifying the same attribute-value pairs.
* <p>Use of this option requires the
* <a href="http://jsonassert.skyscreamer.org/">JSONassert<a/> library
* <a href="http://jsonassert.skyscreamer.org/">JSONassert</a> library
* on to be on the classpath.
* @param expectedJson the expected JSON content.
*/

9
spring-web/src/main/java/org/springframework/http/client/OkHttp3ClientHttpRequestFactory.java

@ -71,9 +71,8 @@ public class OkHttp3ClientHttpRequestFactory @@ -71,9 +71,8 @@ public class OkHttp3ClientHttpRequestFactory
/**
* Sets the underlying read timeout in milliseconds.
* Set the underlying read timeout in milliseconds.
* A value of 0 specifies an infinite timeout.
* @see OkHttpClient.Builder#readTimeout(long, TimeUnit)
*/
public void setReadTimeout(int readTimeout) {
this.client = this.client.newBuilder()
@ -82,9 +81,8 @@ public class OkHttp3ClientHttpRequestFactory @@ -82,9 +81,8 @@ public class OkHttp3ClientHttpRequestFactory
}
/**
* Sets the underlying write timeout in milliseconds.
* Set the underlying write timeout in milliseconds.
* A value of 0 specifies an infinite timeout.
* @see OkHttpClient.Builder#writeTimeout(long, TimeUnit)
*/
public void setWriteTimeout(int writeTimeout) {
this.client = this.client.newBuilder()
@ -93,9 +91,8 @@ public class OkHttp3ClientHttpRequestFactory @@ -93,9 +91,8 @@ public class OkHttp3ClientHttpRequestFactory
}
/**
* Sets the underlying connect timeout in milliseconds.
* Set the underlying connect timeout in milliseconds.
* A value of 0 specifies an infinite timeout.
* @see OkHttpClient.Builder#connectTimeout(long, TimeUnit)
*/
public void setConnectTimeout(int connectTimeout) {
this.client = this.client.newBuilder()

4
spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpConnector.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@ -53,7 +53,7 @@ public class ReactorClientHttpConnector implements ClientHttpConnector { @@ -53,7 +53,7 @@ public class ReactorClientHttpConnector implements ClientHttpConnector {
/**
* Create a Reactor Netty {@link ClientHttpConnector} with the given
* {@link HttpClientOptions.Builder}
* {@code HttpClientOptions.Builder}
*/
public ReactorClientHttpConnector(Consumer<? super HttpClientOptions.Builder> clientOptions) {
this.httpClient = HttpClient.create(clientOptions);

10
spring-web/src/main/java/org/springframework/http/converter/protobuf/ProtobufJsonFormatHttpMessageConverter.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@ -41,7 +41,7 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC @@ -41,7 +41,7 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC
/**
* Construct a new {@code ProtobufJsonFormatHttpMessageConverter} with default
* {@link JsonFormat.Parser} and {@link JsonFormat.Printer} configuration.
* {@code JsonFormat.Parser} and {@code JsonFormat.Printer} configuration.
*/
public ProtobufJsonFormatHttpMessageConverter() {
this(null, null, null);
@ -49,7 +49,7 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC @@ -49,7 +49,7 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC
/**
* Construct a new {@code ProtobufJsonFormatHttpMessageConverter} with the given
* {@link JsonFormat.Parser} and {@link JsonFormat.Printer} configuration.
* {@code JsonFormat.Parser} and {@code JsonFormat.Printer} configuration.
* @param parser the JSON parser configuration
* @param printer the JSON printer configuration
*/
@ -61,8 +61,8 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC @@ -61,8 +61,8 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC
/**
* Construct a new {@code ProtobufJsonFormatHttpMessageConverter} with the given
* {@link JsonFormat.Parser} and {@link JsonFormat.Printer} configuration, also
* accepting an initializer that allows the registration of message extensions
* {@code JsonFormat.Parser} and {@code JsonFormat.Printer} configuration, also
* accepting an initializer that allows the registration of message extensions.
* @param parser the JSON parser configuration
* @param printer the JSON printer configuration
* @param registryInitializer an initializer for message extensions

10
spring-web/src/main/java/org/springframework/http/server/reactive/HttpHandler.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@ -24,16 +24,16 @@ import reactor.core.publisher.Mono; @@ -24,16 +24,16 @@ import reactor.core.publisher.Mono;
*
* <p>Higher-level, but still generic, building blocks for applications such as
* {@code WebFilter}, {@code WebSession}, {@code ServerWebExchange}, and others
* are available in the {@link org.springframework.web.server} package.
* are available in the {@code org.springframework.web.server} package.
*
* <p>Application level programming models such as annotated controllers and
* functional handlers are available in the {@code spring-webflux} module.
*
* <p>Typically an {@link HttpHandler} represents an entire application with
* higher-level programming models bridged via
* {@link org.springframework.web.server.adapter.WebHttpHandlerBuilder
* WebHttpHandlerBuilder}. Multiple applications at unique context paths can be
* plugged in with the help of the {@link ContextPathCompositeHandler}.
* {@link org.springframework.web.server.adapter.WebHttpHandlerBuilder}.
* Multiple applications at unique context paths can be plugged in with the
* help of the {@link ContextPathCompositeHandler}.
*
* @author Arjen Poutsma
* @author Rossen Stoyanchev

7
spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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,8 +55,8 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { @@ -55,8 +55,8 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler {
/**
* Template method called from {@link #hasError(ClientHttpResponse)}.
* <p>The default implementation checks if the given status code is
* {@link HttpStatus.Series#CLIENT_ERROR CLIENT_ERROR} or
* {@link HttpStatus.Series#SERVER_ERROR SERVER_ERROR}.
* {@code HttpStatus.Series#CLIENT_ERROR CLIENT_ERROR} or
* {@code HttpStatus.Series#SERVER_ERROR SERVER_ERROR}.
* Can be overridden in subclasses.
* @param statusCode the HTTP status code
* @return {@code true} if the response has an error; {@code false} otherwise
@ -101,7 +101,6 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { @@ -101,7 +101,6 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler {
}
}
/**
* Determine the HTTP status of the given response.
* @param response the response to inspect

16
spring-web/src/main/java/org/springframework/web/client/ExtractingResponseErrorHandler.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@ -29,25 +29,25 @@ import org.springframework.lang.Nullable; @@ -29,25 +29,25 @@ import org.springframework.lang.Nullable;
import org.springframework.util.CollectionUtils;
/**
* Implementation of {@link ResponseErrorHandler} that uses {@link HttpMessageConverter}s to
* convert HTTP error responses to {@link RestClientException}.
* Implementation of {@link ResponseErrorHandler} that uses {@link HttpMessageConverter}s
* to convert HTTP error responses to {@link RestClientException}.
*
* <p>To use this error handler, you must specify a
* {@linkplain #setStatusMapping(Map) status mapping} and/or a
* {@linkplain #setSeriesMapping(Map) series mapping}. If either of these mappings has a match
* for the {@linkplain ClientHttpResponse#getStatusCode() status code} of a given
* {@code ClientHttpResponse}, {@link #hasError(ClientHttpResponse)} will return
* {@code true} and {@link #handleError(ClientHttpResponse)} will attempt to use the
* {@code true}, and {@link #handleError(ClientHttpResponse)} will attempt to use the
* {@linkplain #setMessageConverters(List) configured message converters} to convert the response
* into the mapped subclass of {@link RestClientException}. Note that the
* {@linkplain #setStatusMapping(Map) status mapping} takes precedence over
* {@linkplain #setSeriesMapping(Map) series mapping}.
*
* <p>If there is no match, this error handler will default to the behavior of
* {@link DefaultResponseErrorHandler}. Note that you can override this default behavior by
* specifying a {@linkplain #setSeriesMapping(Map) series mapping} from
* {@link HttpStatus.Series#CLIENT_ERROR} and/or {@link HttpStatus.Series#SERVER_ERROR} to
* {@code null}.
* {@link DefaultResponseErrorHandler}. Note that you can override this default behavior
* by specifying a {@linkplain #setSeriesMapping(Map) series mapping} from
* {@code HttpStatus.Series#CLIENT_ERROR} and/or {@code HttpStatus.Series#SERVER_ERROR}
* to {@code null}.
*
* @author Simon Galperin
* @author Arjen Poutsma

4
spring-web/src/main/java/org/springframework/web/client/RestOperations.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@ -657,7 +657,7 @@ public interface RestOperations { @@ -657,7 +657,7 @@ public interface RestOperations {
throws RestClientException;
// general execution
// General execution
/**
* Execute the HTTP method to the given URI template, preparing the request with the

32
spring-web/src/main/java/org/springframework/web/client/RestTemplate.java

@ -69,11 +69,11 @@ import org.springframework.web.util.UriTemplateHandler; @@ -69,11 +69,11 @@ import org.springframework.web.util.UriTemplateHandler;
* support of less frequent cases.
*
* <p><strong>NOTE:</strong> As of 5.0, the non-blocking, reactive
* {@link org.springframework.web.reactive.client.WebClient WebClient} offers a
* {@code org.springframework.web.reactive.client.WebClient} offers a
* modern alternative to the {@code RestTemplate} with efficient support for
* both sync and async, as well as streaming scenarios. The {@code RestTemplate}
* will be deprecated in a future version and will not have major new features
* gong forward.
* added going forward.
*
* @author Arjen Poutsma
* @author Brian Clozel
@ -174,7 +174,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat @@ -174,7 +174,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
/**
* Create a new instance of the {@link RestTemplate} based on the given {@link ClientHttpRequestFactory}.
* @param requestFactory HTTP request factory to use
* @param requestFactory the HTTP request factory to use
* @see org.springframework.http.client.SimpleClientHttpRequestFactory
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
*/
@ -185,7 +185,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat @@ -185,7 +185,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
/**
* Create a new instance of the {@link RestTemplate} using the given list of
* {@link HttpMessageConverter} to use
* {@link HttpMessageConverter} to use.
* @param messageConverters the list of {@link HttpMessageConverter} to use
* @since 3.2.7
*/
@ -633,7 +633,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat @@ -633,7 +633,7 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
}
// general execution
// General execution
@Override
@Nullable
@ -732,39 +732,43 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat @@ -732,39 +732,43 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
}
/**
* Returns a request callback implementation that prepares the request {@code Accept}
* headers based on the given response type and configured
* {@linkplain #getMessageConverters() message converters}.
* Return a {@code RequestCallback} that sets the request {@code Accept}
* header based on the given response type, cross-checked against the
* configured message converters.
*/
protected <T> RequestCallback acceptHeaderRequestCallback(Class<T> responseType) {
return new AcceptHeaderRequestCallback(responseType);
}
/**
* Returns a request callback implementation that writes the given object to the
* request stream.
* Return a {@code RequestCallback} implementation that writes the given
* object to the request stream.
*/
protected <T> RequestCallback httpEntityCallback(@Nullable Object requestBody) {
return new HttpEntityRequestCallback(requestBody);
}
/**
* Returns a request callback implementation that writes the given object to the
* request stream.
* Return a {@code RequestCallback} implementation that:
* <ol>
* <li>Sets the request {@code Accept} header based on the given response
* type, cross-checked against the configured message converters.
* <li>Writes the given object to the request stream.
* </ol>
*/
protected <T> RequestCallback httpEntityCallback(@Nullable Object requestBody, Type responseType) {
return new HttpEntityRequestCallback(requestBody, responseType);
}
/**
* Returns a response extractor for {@link ResponseEntity}.
* Return a {@code ResponseExtractor} that prepares a {@link ResponseEntity}.
*/
protected <T> ResponseExtractor<ResponseEntity<T>> responseEntityExtractor(Type responseType) {
return new ResponseEntityResponseExtractor<>(responseType);
}
/**
* Returns a response extractor for {@link HttpHeaders}.
* Return a response extractor for {@link HttpHeaders}.
*/
protected ResponseExtractor<HttpHeaders> headersExtractor() {
return this.headersExtractor;

10
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java

@ -264,7 +264,7 @@ public interface ServerRequest { @@ -264,7 +264,7 @@ public interface ServerRequest {
Mono<MultiValueMap<String, Part>> multipartData();
// Static methods
// Static builder methods
/**
* Create a new {@code ServerRequest} based on the given {@code ServerWebExchange} and
@ -285,20 +285,20 @@ public interface ServerRequest { @@ -285,20 +285,20 @@ public interface ServerRequest {
interface Headers {
/**
* Return the list of acceptable {@linkplain MediaType media types},
* Return the list of acceptable {@code MediaType media types},
* as specified by the {@code Accept} header.
* <p>Returns an empty list when the acceptable media types are unspecified.
*/
List<MediaType> accept();
/**
* Return the list of acceptable {@linkplain Charset charsets},
* Return the list of acceptable {@code Charset charsets},
* as specified by the {@code Accept-Charset} header.
*/
List<Charset> acceptCharset();
/**
* Return the list of acceptable {@linkplain Locale.LanguageRange languages},
* Return the list of acceptable {@code Locale.LanguageRange languages},
* as specified by the {@code Accept-Language} header.
*/
List<Locale.LanguageRange> acceptLanguage();
@ -310,7 +310,7 @@ public interface ServerRequest { @@ -310,7 +310,7 @@ public interface ServerRequest {
OptionalLong contentLength();
/**
* Return the {@linkplain MediaType media type} of the body, as specified
* Return the {@code MediaType media type} of the body, as specified
* by the {@code Content-Type} header.
*/
Optional<MediaType> contentType();

4
spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/ReactorNettyWebSocketClient.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@ -52,7 +52,7 @@ public class ReactorNettyWebSocketClient extends WebSocketClientSupport implemen @@ -52,7 +52,7 @@ public class ReactorNettyWebSocketClient extends WebSocketClientSupport implemen
}
/**
* Constructor that accepts an {@link HttpClientOptions.Builder} consumer
* Constructor that accepts an {@code HttpClientOptions.Builder} consumer
* to supply to {@link HttpClient#create(Consumer)}.
*/
public ReactorNettyWebSocketClient(Consumer<? super HttpClientOptions.Builder> clientOptions) {

20
spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/UndertowWebSocketClient.java

@ -66,7 +66,7 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W @@ -66,7 +66,7 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W
/**
* Constructor with the {@link XnioWorker} to pass to
* {@link io.undertow.websockets.client.WebSocketClient#connectionBuilder}
* {@link io.undertow.websockets.client.WebSocketClient#connectionBuilder}.
* @param worker the Xnio worker
*/
public UndertowWebSocketClient(XnioWorker worker) {
@ -112,9 +112,10 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W @@ -112,9 +112,10 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W
/**
* Set the {@link io.undertow.connector.ByteBufferPool ByteBufferPool} to pass to
* {@link io.undertow.websockets.client.WebSocketClient#connectionBuilder}.
* <p>By default an indirect {@link io.undertow.server.DefaultByteBufferPool} with a buffer size
* of {@value #DEFAULT_POOL_BUFFER_SIZE} is used.
* <p>By default an indirect {@link io.undertow.server.DefaultByteBufferPool}
* with a buffer size of 8192 is used.
* @since 5.0.8
* @see #DEFAULT_POOL_BUFFER_SIZE
*/
public void setByteBufferPool(ByteBufferPool byteBufferPool) {
Assert.notNull(byteBufferPool, "ByteBufferPool must not be null");
@ -122,8 +123,9 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W @@ -122,8 +123,9 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W
}
/**
* @return the {@link io.undertow.connector.ByteBufferPool} currently used
* for newly created WebSocket sessions by this client
* Return the {@link io.undertow.connector.ByteBufferPool} currently used
* for newly created WebSocket sessions by this client.
* @return the byte buffer pool
* @since 5.0.8
*/
public ByteBufferPool getByteBufferPool() {
@ -131,17 +133,15 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W @@ -131,17 +133,15 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W
}
/**
* Return the configured {@code Consumer<ConnectionBuilder}.
* Return the configured <code>Consumer&lt;ConnectionBuilder&gt;</code>.
*/
public Consumer<ConnectionBuilder> getConnectionBuilderConsumer() {
return this.builderConsumer;
}
/**
* Configure the size of the {@link io.undertow.connector.ByteBufferPool
* ByteBufferPool} to pass to
* {@link io.undertow.websockets.client.WebSocketClient#connectionBuilder}.
* <p>By default the buffer size is set to {@value #DEFAULT_POOL_BUFFER_SIZE}.
* Configure the size of the {@link io.undertow.connector.ByteBufferPool} to pass
* to {@link io.undertow.websockets.client.WebSocketClient#connectionBuilder}.
* @deprecated as of 5.0.8 this method is deprecated in favor
* of {@link #setByteBufferPool(io.undertow.connector.ByteBufferPool)}
*/

4
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java

@ -367,10 +367,10 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem @@ -367,10 +367,10 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
}
this.sessionCleanupTask = getTaskScheduler().scheduleAtFixedRate(() -> {
List<String> removedIds = new ArrayList<>();
for (SockJsSession session : sessions.values()) {
for (SockJsSession session : this.sessions.values()) {
try {
if (session.getTimeSinceLastActive() > getDisconnectDelay()) {
sessions.remove(session.getId());
this.sessions.remove(session.getId());
removedIds.add(session.getId());
session.close();
}

Loading…
Cancel
Save