parent
1eb06fcd90
commit
84300b796c
|
@ -61,7 +61,7 @@ import org.springframework.util.ClassUtils;
|
|||
* <p>On the classpath, bundle resources will be read with the locally configured
|
||||
* {@link #setDefaultEncoding encoding}: by default, ISO-8859-1; consider switching
|
||||
* this to UTF-8, or to {@code null} for the platform default encoding. On the JDK 9+
|
||||
* module path where locally provided {@link ResourceBundle.Control} handles are not
|
||||
* module path where locally provided {@code ResourceBundle.Control} handles are not
|
||||
* supported, this MessageSource always falls back to {@link ResourceBundle#getBundle}
|
||||
* retrieval with the platform default encoding: UTF-8 with a ISO-8859-1 fallback on
|
||||
* JDK 9+ (configurable through the "java.util.PropertyResourceBundle.encoding" system
|
||||
|
@ -269,7 +269,7 @@ public class ResourceBundleMessageSource extends AbstractResourceBasedMessageSou
|
|||
* Load a property-based resource bundle from the given reader.
|
||||
* <p>This will be called in case of a {@link #setDefaultEncoding "defaultEncoding"},
|
||||
* including {@link ResourceBundleMessageSource}'s default ISO-8859-1 encoding.
|
||||
* Note that this method can only be called with a {@link ResourceBundle.Control}:
|
||||
* Note that this method can only be called with a {@code ResourceBundle.Control}:
|
||||
* When running on the JDK 9+ module path where such control handles are not
|
||||
* supported, any overrides in custom subclasses will effectively get ignored.
|
||||
* <p>The default implementation returns a {@link PropertyResourceBundle}.
|
||||
|
@ -291,7 +291,7 @@ public class ResourceBundleMessageSource extends AbstractResourceBasedMessageSou
|
|||
* set to {@code null}, explicitly enforcing the platform default encoding
|
||||
* (which is UTF-8 with a ISO-8859-1 fallback on JDK 9+ but configurable
|
||||
* through the "java.util.PropertyResourceBundle.encoding" system property).
|
||||
* Note that this method can only be called with a {@link ResourceBundle.Control}:
|
||||
* Note that this method can only be called with a {@code ResourceBundle.Control}:
|
||||
* When running on the JDK 9+ module path where such control handles are not
|
||||
* supported, any overrides in custom subclasses will effectively get ignored.
|
||||
* <p>The default implementation returns a {@link PropertyResourceBundle}.
|
||||
|
@ -395,9 +395,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 {
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ import org.springframework.jdbc.InvalidResultSetAccessException;
|
|||
|
||||
/**
|
||||
* The default implementation of Spring's {@link SqlRowSet} interface, wrapping a
|
||||
* {@link java.sql.ResultSet}, catching any {@link SQLException java.sql.ResultSet}, catching any {@link SQLExceptions} and translating
|
||||
* them to a corresponding Spring {@link InvalidResultSetAccessException}.
|
||||
* {@link java.sql.ResultSet}, catching any {@link SQLException SQLExceptions} and
|
||||
* translating them to a corresponding Spring {@link InvalidResultSetAccessException}.
|
||||
*
|
||||
* <p>The passed-in ResultSet should already be disconnected if the SqlRowSet is supposed
|
||||
* to be usable in a disconnected fashion. This means that you will usually pass in a
|
||||
|
|
|
@ -23,8 +23,8 @@ import org.springframework.jdbc.InvalidResultSetAccessException;
|
|||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* The default implementation of Spring's {@link SqlRowSetMetaData} interface, wrapping
|
||||
* a {@link java.sql.ResultSetMetaData} instance, catching any {@link SQLException java.sql.ResultSetMetaData} instance, catching any {@link SQLExceptions}
|
||||
* The default implementation of Spring's {@link SqlRowSetMetaData} interface, wrapping a
|
||||
* {@link java.sql.ResultSetMetaData} instance, catching any {@link SQLException SQLExceptions}
|
||||
* and translating them to a corresponding Spring {@link InvalidResultSetAccessException}.
|
||||
*
|
||||
* <p>Used by {@link ResultSetWrappingSqlRowSet}.
|
||||
|
|
|
@ -34,7 +34,8 @@ import org.springframework.messaging.Message;
|
|||
public interface ReactorNettyCodec<P> {
|
||||
|
||||
/**
|
||||
* Decode the input {@link ByteBuf} into one or more {@link Message ByteBuf} into one or more {@link Messages}.
|
||||
* Decode the input {@link ByteBuf} into one or more {@link Message ByteBuf}
|
||||
* into one or more {@link Message} objects.
|
||||
* @param inputBuffer the input buffer to decode from
|
||||
* @return 0 or more decoded messages
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,8 @@ import org.springframework.http.HttpMethod;
|
|||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptor ClientHttpRequestFactory} wrapper with support for {@link ClientHttpRequestInterceptors}.
|
||||
* {@link ClientHttpRequestFactory} wrapper with support for
|
||||
* {@link ClientHttpRequestInterceptor ClientHttpRequestInterceptors}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.1
|
||||
|
|
|
@ -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
|
|||
}
|
||||
|
||||
/**
|
||||
* 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
|
|||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
|
|
|
@ -43,7 +43,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, (ExtensionRegistry)null);
|
||||
|
@ -51,7 +51,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
|
||||
*/
|
||||
|
@ -63,7 +63,7 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC
|
|||
|
||||
/**
|
||||
* Construct a new {@code ProtobufJsonFormatHttpMessageConverter} with the given
|
||||
* {@link JsonFormat.Parser} and {@link JsonFormat.Printer} configuration, also
|
||||
* {@code JsonFormat.Parser} and {@code JsonFormat.Printer} configuration, also
|
||||
* accepting a registry that specifies protocol message extensions.
|
||||
* @param parser the JSON parser configuration
|
||||
* @param printer the JSON printer configuration
|
||||
|
@ -78,7 +78,7 @@ public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageC
|
|||
|
||||
/**
|
||||
* Construct a new {@code ProtobufJsonFormatHttpMessageConverter} with the given
|
||||
* {@link JsonFormat.Parser} and {@link JsonFormat.Printer} configuration, also
|
||||
* {@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
|
||||
|
|
|
@ -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;
|
|||
*
|
||||
* <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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -45,10 +45,10 @@ import org.springframework.util.CollectionUtils;
|
|||
* {@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
|
||||
|
|
|
@ -73,7 +73,7 @@ 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
|
||||
|
|
|
@ -81,10 +81,8 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add {@link Consumer} for a {@link ResponseCookie.ResponseCookieBuilder
|
||||
* ResponseCookieBuilder} that will be invoked for each cookie being built,
|
||||
* just before the call to
|
||||
* {@link ResponseCookie.ResponseCookieBuilder#build() build()}.
|
||||
* Add {@link Consumer} for a {@code ResponseCookieBuilder} that will be invoked
|
||||
* for each cookie being built, just before the call to {@code build()}.
|
||||
* @param initializer consumer for a cookie builder
|
||||
* @since 5.1
|
||||
*/
|
||||
|
|
|
@ -320,20 +320,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();
|
||||
|
@ -345,7 +345,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();
|
||||
|
@ -398,7 +398,7 @@ public interface ServerRequest {
|
|||
*/
|
||||
Builder uri(URI uri);
|
||||
|
||||
/**
|
||||
/**
|
||||
* Add the given header value(s) under the given name.
|
||||
* @param headerName the header name
|
||||
* @param headerValues the header value(s)
|
||||
|
@ -427,8 +427,8 @@ public interface ServerRequest {
|
|||
Builder cookie(String name, String... values);
|
||||
|
||||
/**
|
||||
* Manipulate this request's cookies with the given consumer. The
|
||||
* map provided to the consumer is "live", so that the consumer can be used to
|
||||
* Manipulate this request's cookies with the given consumer.
|
||||
* The map provided to the consumer is "live", so that the consumer can be used to
|
||||
* {@linkplain MultiValueMap#set(Object, Object) overwrite} existing header values,
|
||||
* {@linkplain MultiValueMap#remove(Object) remove} values, or use any of the other
|
||||
* {@link MultiValueMap} methods.
|
||||
|
@ -465,9 +465,9 @@ public interface ServerRequest {
|
|||
Builder attribute(String name, Object value);
|
||||
|
||||
/**
|
||||
* Manipulate this request's attributes with the given consumer. The map provided to the
|
||||
* consumer is "live", so that the consumer can be used to
|
||||
* {@linkplain Map#put(Object, Object) overwrite} existing header values,
|
||||
* Manipulate this request's attributes with the given consumer.
|
||||
* The map provided to the consumer is "live", so that the consumer can be used
|
||||
* to {@linkplain Map#put(Object, Object) overwrite} existing header values,
|
||||
* {@linkplain Map#remove(Object) remove} values, or use any of the other
|
||||
* {@link Map} methods.
|
||||
* @param attributesConsumer a function that consumes the attributes map
|
||||
|
|
|
@ -116,9 +116,10 @@ public class UndertowWebSocketClient implements WebSocketClient {
|
|||
/**
|
||||
* 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");
|
||||
|
|
|
@ -27,8 +27,9 @@ import org.springframework.web.socket.WebSocketSession;
|
|||
|
||||
/**
|
||||
* A contract for handling WebSocket messages as part of a higher level protocol,
|
||||
* referred to as "sub-protocol" in the WebSocket RFC specification. Handles both
|
||||
* {@link WebSocketMessage}s from a client as well as {@link Message WebSocketMessage}s from a client as well as {@link Messages} to a client.
|
||||
* referred to as "sub-protocol" in the WebSocket RFC specification.
|
||||
* Handles both {@link WebSocketMessage WebSocketMessages} from a client
|
||||
* as well as {@link Message Messages} to a client.
|
||||
*
|
||||
* <p>Implementations of this interface can be configured on a
|
||||
* {@link SubProtocolWebSocketHandler} which selects a sub-protocol handler to
|
||||
|
|
|
@ -53,8 +53,8 @@ import org.springframework.web.socket.sockjs.support.AbstractSockJsService;
|
|||
* A basic implementation of {@link org.springframework.web.socket.sockjs.SockJsService}
|
||||
* with support for SPI-based transport handling and session management.
|
||||
*
|
||||
* <p>Based on the {@link TransportHandler} SPI. {@link TransportHandler TransportHandler} SPI. {@link TransportHandlers} may additionally
|
||||
* implement the {@link SockJsSessionFactory} and {@link HandshakeHandler} interfaces.
|
||||
* <p>Based on the {@link TransportHandler} SPI. {@link TransportHandler TransportHandlers} may
|
||||
* additionally implement the {@link SockJsSessionFactory} and {@link HandshakeHandler} interfaces.
|
||||
*
|
||||
* <p>See the {@link AbstractSockJsService} base class for important details on request mapping.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue