diff --git a/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyCodec.java b/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyCodec.java index e25ae26af56..a0cef96268d 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyCodec.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyCodec.java @@ -34,8 +34,7 @@ import org.springframework.messaging.Message; public interface ReactorNettyCodec
{ /** - * Decode the input {@link ByteBuf} into one or more {@link Message ByteBuf} - * into one or more {@link Message} objects. + * Decode the input {@link ByteBuf} into one or more {@link Message Messages}. * @param inputBuffer the input buffer to decode from * @return 0 or more decoded messages */ @@ -43,7 +42,7 @@ public interface ReactorNettyCodec
{ /** * Encode the given {@link Message} to the output {@link ByteBuf}. - * @param message the message the encode + * @param message the message to encode * @param outputBuffer the buffer to write to */ void encode(Message
message, ByteBuf outputBuffer); diff --git a/spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java b/spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java index 922f7b41536..103fdbc4458 100644 --- a/spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java +++ b/spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java @@ -81,7 +81,7 @@ public class CookieWebSessionIdResolver implements WebSessionIdResolver { } /** - * Add {@link Consumer} for a {@code ResponseCookieBuilder} that will be invoked + * Add a {@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 diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java index 7a2f11120ae..92c0b128aad 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java @@ -52,7 +52,8 @@ import org.springframework.web.util.UriBuilder; /** * Represents a server-side HTTP request, as handled by a {@code HandlerFunction}. - * Access to headers and body is offered by {@link Headers} and + * + *
Access to headers and body is offered by {@link Headers} and * {@link #body(BodyExtractor)}, respectively. * * @author Arjen Poutsma @@ -62,7 +63,7 @@ import org.springframework.web.util.UriBuilder; public interface ServerRequest { /** - * Return the HTTP method. + * Get the HTTP method. * @return the HTTP method as an HttpMethod enum value, or {@code null} * if not resolvable (e.g. in case of a non-standard HTTP method) */ @@ -72,21 +73,21 @@ public interface ServerRequest { } /** - * Return the name of the HTTP method. + * Get the name of the HTTP method. * @return the HTTP method as a String */ String methodName(); /** - * Return the request URI. + * Get the request URI. */ URI uri(); /** - * Return a {@code UriBuilderComponents} from the URI associated with this + * Get a {@code UriBuilderComponents} from the URI associated with this * {@code ServerRequest}. - *
Note: as of 5.1 this method ignores - * {@code "Forwarded"} and {@code "X-Forwarded-*"} headers that specify the + *
Note: as of 5.1 this method ignores {@code "Forwarded"}
+ * and {@code "X-Forwarded-*"} headers that specify the
* client-originated address. Consider using the {@code ForwardedHeaderFilter}
* to extract and use, or to discard such headers.
* @return a URI builder
@@ -94,37 +95,37 @@ public interface ServerRequest {
UriBuilder uriBuilder();
/**
- * Return the request path.
+ * Get the request path.
*/
default String path() {
return uri().getRawPath();
}
/**
- * Return the request path as {@code PathContainer}.
+ * Get the request path as a {@code PathContainer}.
*/
default PathContainer pathContainer() {
return PathContainer.parsePath(path());
}
/**
- * Return the headers of this request.
+ * Get the headers of this request.
*/
Headers headers();
/**
- * Return the cookies of this request.
+ * Get the cookies of this request.
*/
MultiValueMap Always guaranteed to return an instance either matching the session id
+ * requested by the client, or with a new session id either because the client
+ * did not specify one or because the underlying session had expired.
+ * Use of this method does not automatically create a session.
*/
Mono Note: calling this method causes the request body to
- * be read and parsed in full and the resulting {@code MultiValueMap} is
+ * be read and parsed in full, and the resulting {@code MultiValueMap} is
* cached so that this method is safe to call more than once.
*/
Mono Note: calling this method causes the request body to
- * be read and parsed in full and the resulting {@code MultiValueMap} is
+ * be read and parsed in full, and the resulting {@code MultiValueMap} is
* cached so that this method is safe to call more than once.
*/
Mono Note: Manipulating the exchange directly (instead of using the methods provided on
* {@code ServerRequest} and {@code ServerResponse}) can lead to irregular results.
* @since 5.1
@@ -318,59 +319,60 @@ public interface ServerRequest {
interface Headers {
/**
- * Return the list of acceptable {@code MediaType media types},
- * as specified by the {@code Accept} header.
- * Returns an empty list when the acceptable media types are unspecified.
+ * Get the list of acceptable media types, as specified by the {@code Accept}
+ * header.
+ * Returns an empty list if the acceptable media types are unspecified.
*/
List If the header value does not contain a port, the returned
- * {@linkplain InetSocketAddress#getPort() port} will be {@code 0}.
+ * Get the value of the required {@code Host} header.
+ * If the header value does not contain a port, the
+ * {@linkplain InetSocketAddress#getPort() port} in the returned address will
+ * be {@code 0}.
*/
@Nullable
InetSocketAddress host();
/**
- * Return the value of the {@code Range} header.
+ * Get the value of the {@code Range} header.
* Returns an empty list when the range is unknown.
*/
List Return an empty list if no header values are found.
+ * Get the header value(s), if any, for the header of the given name.
+ * Returns an empty list if no header values are found.
* @param headerName the header name
*/
List The headers provided to the consumer are "live", so that the consumer can be used to
* {@linkplain HttpHeaders#set(String, String) overwrite} existing header values,
* {@linkplain HttpHeaders#remove(Object) remove} values, or use any of the other
* {@link HttpHeaders} methods.
@@ -426,9 +428,9 @@ public interface ServerRequest {
/**
* 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
+ * The map provided to the consumer is "live", so that the consumer can be used to
+ * {@linkplain MultiValueMap#set(Object, Object) overwrite} existing cookies,
+ * {@linkplain MultiValueMap#remove(Object) remove} cookies, or use any of the other
* {@link MultiValueMap} methods.
* @param cookiesConsumer a function that consumes the cookies map
* @return this builder
@@ -436,27 +438,28 @@ public interface ServerRequest {
Builder cookies(Consumer Calling this methods will
* {@linkplain org.springframework.core.io.buffer.DataBufferUtils#release(DataBuffer) release}
* the existing body of the builder.
- * @param body the new body.
+ * @param body the new body
* @return this builder
*/
Builder body(Flux Calling this methods will
* {@linkplain org.springframework.core.io.buffer.DataBufferUtils#release(DataBuffer) release}
* the existing body of the builder.
- * @param body the new body.
+ * @param body the new body
* @return this builder
*/
Builder body(String body);
/**
- * Adds an attribute with the given name and value.
- * @param name the attribute name
+ * Add an attribute with the given name and value.
+ * @param name the attribute name
* @param value the attribute value
* @return this builder
*/
@@ -464,9 +467,9 @@ public interface ServerRequest {
/**
* 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
+ * The map provided to the consumer is "live", so that the consumer can be used
+ * to {@linkplain Map#put(Object, Object) overwrite} existing attributes,
+ * {@linkplain Map#remove(Object) remove} attributes, or use any of the other
* {@link Map} methods.
* @param attributesConsumer a function that consumes the attributes map
* @return this builder
@@ -474,7 +477,7 @@ public interface ServerRequest {
Builder attributes(Consumer