Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
032096d699
commit
e0480f75ac
@@ -77,7 +77,7 @@ public class ResourceHandlerRegistry {
|
||||
* <p>Patterns like {@code "/static/**"} or {@code "/css/{filename:\\w+\\.css}"}
|
||||
* are allowed. See {@link org.springframework.web.util.pattern.PathPattern}
|
||||
* for more details on the syntax.
|
||||
* @return A {@link ResourceHandlerRegistration} to use to further
|
||||
* @return a {@link ResourceHandlerRegistration} to use to further
|
||||
* configure the registered resource handler
|
||||
*/
|
||||
public ResourceHandlerRegistration addResourceHandler(String... patterns) {
|
||||
|
||||
@@ -333,7 +333,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
|
||||
}
|
||||
|
||||
/**
|
||||
* Override to add custom {@link Converter}s and {@link Formatter}s.
|
||||
* Override to add custom {@link Converter}s and {@link Formatter Converter}s and {@link Formatters}.
|
||||
*/
|
||||
protected void addFormatters(FormatterRegistry registry) {
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -96,7 +96,7 @@ public interface WebFluxConfigurer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom {@link Converter}s and {@link Formatter}s for performing type
|
||||
* Add custom {@link Converter}s and {@link Formatter Converter}s and {@link Formatters} for performing type
|
||||
* conversion and formatting of annotated controller method arguments.
|
||||
*/
|
||||
default void addFormatters(FormatterRegistry registry) {
|
||||
|
||||
@@ -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.
|
||||
@@ -51,7 +51,7 @@ public interface BodyExtractor<T, M extends ReactiveHttpInputMessage> {
|
||||
interface Context {
|
||||
|
||||
/**
|
||||
* Return the {@link HttpMessageReader}s to be used for body extraction.
|
||||
* Return the {@link HttpMessageReader HttpMessageReaders} to be used for body extraction.
|
||||
* @return the stream of message readers
|
||||
*/
|
||||
List<HttpMessageReader<?>> messageReaders();
|
||||
|
||||
@@ -161,7 +161,7 @@ public abstract class BodyExtractors {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extractor that returns the raw {@link DataBuffer}s.
|
||||
* Extractor that returns the raw {@link DataBuffer DataBuffers}.
|
||||
* <p><strong>Note:</strong> the data buffers should be
|
||||
* {@link org.springframework.core.io.buffer.DataBufferUtils#release(DataBuffer)
|
||||
* released} after being used.
|
||||
|
||||
@@ -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 interface BodyInserter<T, M extends ReactiveHttpOutputMessage> {
|
||||
interface Context {
|
||||
|
||||
/**
|
||||
* Return the {@link HttpMessageWriter}s to be used for response body conversion.
|
||||
* Return the {@link HttpMessageWriter HttpMessageWriters} to be used for response body conversion.
|
||||
* @return the stream of message writers
|
||||
*/
|
||||
List<HttpMessageWriter<?>> messageWriters();
|
||||
|
||||
@@ -329,6 +329,8 @@ public abstract class BodyInserters {
|
||||
/**
|
||||
* Extension of {@link BodyInserter} that allows for adding form data or
|
||||
* multipart form data.
|
||||
*
|
||||
* @param <T> the value type
|
||||
*/
|
||||
public interface FormInserter<T> extends BodyInserter<MultiValueMap<String, T>, ClientHttpRequest> {
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ import org.springframework.http.codec.HttpMessageWriter;
|
||||
public interface ExchangeStrategies {
|
||||
|
||||
/**
|
||||
* Return {@link HttpMessageReader}s to read and decode the response body with.
|
||||
* Return {@link HttpMessageReader HttpMessageReaders} to read and decode the response body with.
|
||||
* @return the stream of message readers
|
||||
*/
|
||||
List<HttpMessageReader<?>> messageReaders();
|
||||
|
||||
/**
|
||||
* Return {@link HttpMessageWriter}s to write and encode the request body with.
|
||||
* Return {@link HttpMessageWriter HttpMessageWriters} to write and encode the request body with.
|
||||
* @return the stream of message writers
|
||||
*/
|
||||
List<HttpMessageWriter<?>> messageWriters();
|
||||
|
||||
@@ -298,7 +298,7 @@ public interface WebClient {
|
||||
Builder exchangeFunction(ExchangeFunction exchangeFunction);
|
||||
|
||||
/**
|
||||
* Clone this {@code WebClient.Builder}
|
||||
* Clone this {@code WebClient.Builder}.
|
||||
*/
|
||||
Builder clone();
|
||||
|
||||
@@ -319,6 +319,8 @@ public interface WebClient {
|
||||
|
||||
/**
|
||||
* Contract for specifying the URI for a request.
|
||||
*
|
||||
* @param <S> a self reference to the spec type
|
||||
*/
|
||||
interface UriSpec<S extends RequestHeadersSpec<?>> {
|
||||
|
||||
@@ -351,6 +353,8 @@ public interface WebClient {
|
||||
|
||||
/**
|
||||
* Contract for specifying request headers leading up to the exchange.
|
||||
*
|
||||
* @param <S> a self reference to the spec type
|
||||
*/
|
||||
interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
|
||||
|
||||
@@ -462,13 +466,13 @@ public interface WebClient {
|
||||
* .uri("/persons/1")
|
||||
* .accept(MediaType.APPLICATION_JSON)
|
||||
* .exchange()
|
||||
* .flatMap(response -> response.bodyToMono(Person.class));
|
||||
* .flatMap(response -> response.bodyToMono(Person.class));
|
||||
*
|
||||
* Flux<Person> flux = client.get()
|
||||
* .uri("/persons")
|
||||
* .accept(MediaType.APPLICATION_STREAM_JSON)
|
||||
* .exchange()
|
||||
* .flatMapMany(response -> response.bodyToFlux(Person.class));
|
||||
* .flatMapMany(response -> response.bodyToFlux(Person.class));
|
||||
* </pre>
|
||||
* <p><strong>NOTE:</strong> You must always use one of the body or
|
||||
* entity methods of the response to ensure resources are released.
|
||||
@@ -480,6 +484,9 @@ public interface WebClient {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contract for specifying request headers and body leading up to the exchange.
|
||||
*/
|
||||
interface RequestBodySpec extends RequestHeadersSpec<RequestBodySpec> {
|
||||
|
||||
/**
|
||||
@@ -552,7 +559,7 @@ public interface WebClient {
|
||||
* <p><pre class="code">
|
||||
* Person person = ... ;
|
||||
*
|
||||
* Mono<Void> result = client.post()
|
||||
* Mono<Void> result = client.post()
|
||||
* .uri("/persons/{id}", id)
|
||||
* .contentType(MediaType.APPLICATION_JSON)
|
||||
* .syncBody(person)
|
||||
@@ -573,7 +580,9 @@ public interface WebClient {
|
||||
RequestHeadersSpec<?> syncBody(Object body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contract for specifying response operations following the exchange.
|
||||
*/
|
||||
interface ResponseSpec {
|
||||
|
||||
/**
|
||||
@@ -637,11 +646,18 @@ public interface WebClient {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contract for specifying request headers and URI for a request.
|
||||
*
|
||||
* @param <S> a self reference to the spec type
|
||||
*/
|
||||
interface RequestHeadersUriSpec<S extends RequestHeadersSpec<S>>
|
||||
extends UriSpec<S>, RequestHeadersSpec<S> {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contract for specifying request headers, body and URI for a request.
|
||||
*/
|
||||
interface RequestBodyUriSpec extends RequestBodySpec, RequestHeadersUriSpec<RequestBodySpec> {
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* @author Arjen Poutsma
|
||||
* @author Juergen Hoeller
|
||||
* @since 5.0
|
||||
* @param <T> a self reference to the builder type
|
||||
*/
|
||||
class DefaultEntityResponseBuilder<T> implements EntityResponse.Builder<T> {
|
||||
|
||||
|
||||
@@ -272,6 +272,9 @@ class DefaultServerResponseBuilder implements ServerResponse.BodyBuilder {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link ServerResponse} implementations.
|
||||
*/
|
||||
abstract static class AbstractServerResponse implements ServerResponse {
|
||||
|
||||
private static final Set<HttpMethod> SAFE_METHODS = EnumSet.of(HttpMethod.GET, HttpMethod.HEAD);
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.springframework.web.reactive.function.BodyInserters;
|
||||
* @author Arjen Poutsma
|
||||
* @author Juergen Hoeller
|
||||
* @since 5.0
|
||||
* @param <T> the entity type
|
||||
*/
|
||||
public interface EntityResponse<T> extends ServerResponse {
|
||||
|
||||
@@ -100,6 +101,8 @@ public interface EntityResponse<T> extends ServerResponse {
|
||||
|
||||
/**
|
||||
* Defines a builder for {@code EntityResponse}.
|
||||
*
|
||||
* @param <T> a self reference to the builder type
|
||||
*/
|
||||
interface Builder<T> {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.web.server.WebFilter;
|
||||
import org.springframework.web.server.i18n.LocaleContextResolver;
|
||||
|
||||
/**
|
||||
* Defines the strategies to be used for processing {@link HandlerFunction}s. An instance of
|
||||
* Defines the strategies to be used for processing {@link HandlerFunction HandlerFunctions}. An instance of
|
||||
* this class is immutable; instances are typically created through the mutable {@link Builder}:
|
||||
* either through {@link #builder()} to set up default strategies, or {@link #empty()} to start from
|
||||
* scratch.
|
||||
@@ -42,31 +42,31 @@ import org.springframework.web.server.i18n.LocaleContextResolver;
|
||||
public interface HandlerStrategies {
|
||||
|
||||
/**
|
||||
* Return the {@link HttpMessageReader}s to be used for request body conversion.
|
||||
* Return the {@link HttpMessageReader HttpMessageReaders} to be used for request body conversion.
|
||||
* @return the message readers
|
||||
*/
|
||||
List<HttpMessageReader<?>> messageReaders();
|
||||
|
||||
/**
|
||||
* Return the {@link HttpMessageWriter}s to be used for response body conversion.
|
||||
* Return the {@link HttpMessageWriter HttpMessageWriters} to be used for response body conversion.
|
||||
* @return the message writers
|
||||
*/
|
||||
List<HttpMessageWriter<?>> messageWriters();
|
||||
|
||||
/**
|
||||
* Return the {@link ViewResolver}s to be used for view name resolution.
|
||||
* Return the {@link ViewResolver ViewResolvers} to be used for view name resolution.
|
||||
* @return the view resolvers
|
||||
*/
|
||||
List<ViewResolver> viewResolvers();
|
||||
|
||||
/**
|
||||
* Return the {@link WebFilter}s to be used for filtering the request and response.
|
||||
* Return the {@link WebFilter WebFilters} to be used for filtering the request and response.
|
||||
* @return the web filters
|
||||
*/
|
||||
List<WebFilter> webFilters();
|
||||
|
||||
/**
|
||||
* Return the {@link WebExceptionHandler}s to be used for handling exceptions.
|
||||
* Return the {@link WebExceptionHandler WebExceptionHandlers} to be used for handling exceptions.
|
||||
* @return the exception handlers
|
||||
*/
|
||||
List<WebExceptionHandler> exceptionHandlers();
|
||||
|
||||
@@ -77,10 +77,10 @@ public interface RenderingResponse extends ServerResponse {
|
||||
/**
|
||||
* Add the supplied attribute to the model using a
|
||||
* {@linkplain org.springframework.core.Conventions#getVariableName generated name}.
|
||||
* <p><emphasis>Note: Empty {@link Collection Collections} are not added to
|
||||
* <p><em>Note: Empty {@link Collection Collections} are not added to
|
||||
* the model when using this method because we cannot correctly determine
|
||||
* the true convention name. View code should check for {@code null} rather
|
||||
* than for empty collections.</emphasis>
|
||||
* than for empty collections.</em>
|
||||
* @param attribute the model attribute value (never {@code null})
|
||||
*/
|
||||
Builder modelAttribute(Object attribute);
|
||||
|
||||
@@ -293,7 +293,7 @@ public abstract class RequestPredicates {
|
||||
|
||||
/**
|
||||
* Return a {@code RequestPredicate} that matches if the request's query parameter of the given name
|
||||
* has the given value
|
||||
* has the given value.
|
||||
* @param name the name of the query parameter to test against
|
||||
* @param value the value of the query parameter to test against
|
||||
* @return a predicate that matches if the query parameter has the given value
|
||||
@@ -473,6 +473,10 @@ public abstract class RequestPredicates {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@link RequestPredicate} for where both {@code left} and {@code right} predicates
|
||||
* must match.
|
||||
*/
|
||||
static class AndRequestPredicate implements RequestPredicate {
|
||||
|
||||
private final RequestPredicate left;
|
||||
@@ -503,6 +507,10 @@ public abstract class RequestPredicates {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@link RequestPredicate} for where either {@code left} or {@code right} predicates
|
||||
* may match.
|
||||
*/
|
||||
static class OrRequestPredicate implements RequestPredicate {
|
||||
|
||||
private final RequestPredicate left;
|
||||
|
||||
@@ -324,6 +324,13 @@ public abstract class RouterFunctions {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A composed routing function that first invokes one function, and then invokes the
|
||||
* another function (of the same response type {@code T}) if this route had
|
||||
* {@linkplain Mono#empty() no result}.
|
||||
*
|
||||
* @param <T> the server response type
|
||||
*/
|
||||
static final class SameComposedRouterFunction<T extends ServerResponse> extends AbstractRouterFunction<T> {
|
||||
|
||||
private final RouterFunction<T> first;
|
||||
@@ -348,6 +355,11 @@ public abstract class RouterFunctions {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A composed routing function that first invokes one function, and then invokes
|
||||
* another function (of a different response type) if this route had
|
||||
* {@linkplain Mono#empty() no result}.
|
||||
*/
|
||||
static final class DifferentComposedRouterFunction extends AbstractRouterFunction<ServerResponse> {
|
||||
|
||||
private final RouterFunction<?> first;
|
||||
@@ -374,6 +386,13 @@ public abstract class RouterFunctions {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the specified {@linkplain HandlerFunction handler functions} with the given
|
||||
* {@linkplain HandlerFilterFunction filter function}.
|
||||
*
|
||||
* @param <T> the type of the {@linkplain HandlerFunction handler function} to filter
|
||||
* @param <S> the type of the response of the function
|
||||
*/
|
||||
static final class FilteredRouterFunction<T extends ServerResponse, S extends ServerResponse>
|
||||
implements RouterFunction<S> {
|
||||
|
||||
|
||||
@@ -412,9 +412,9 @@ public interface ServerResponse {
|
||||
* Render the template with the given {@code name} using the given {@code modelAttributes}.
|
||||
* The model attributes are mapped under a
|
||||
* {@linkplain org.springframework.core.Conventions#getVariableName generated name}.
|
||||
* <p><emphasis>Note: Empty {@link Collection Collections} are not added to
|
||||
* <p><em>Note: Empty {@link Collection Collections} are not added to
|
||||
* the model when using this method because we cannot correctly determine
|
||||
* the true convention name.</emphasis>
|
||||
* the true convention name.</em>
|
||||
* @param name the name of the template to be rendered
|
||||
* @param modelAttributes the modelAttributes used to render the template
|
||||
* @return the built response
|
||||
@@ -437,13 +437,13 @@ public interface ServerResponse {
|
||||
interface Context {
|
||||
|
||||
/**
|
||||
* Return the {@link HttpMessageWriter}s to be used for response body conversion.
|
||||
* Return the {@link HttpMessageWriter HttpMessageWriters} to be used for response body conversion.
|
||||
* @return the list of message writers
|
||||
*/
|
||||
List<HttpMessageWriter<?>> messageWriters();
|
||||
|
||||
/**
|
||||
* Return the {@link ViewResolver}s to be used for view name resolution.
|
||||
* Return the {@link ViewResolver ViewResolvers} to be used for view name resolution.
|
||||
* @return the list of view resolvers
|
||||
*/
|
||||
List<ViewResolver> viewResolvers();
|
||||
|
||||
@@ -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,7 +29,7 @@ import org.springframework.web.reactive.function.server.ServerRequest;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* {@code HandlerAdapter} implementation that supports {@link HandlerFunction}s.
|
||||
* {@code HandlerAdapter} implementation that supports {@link HandlerFunction HandlerFunctions}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.web.reactive.handler.AbstractHandlerMapping;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* {@code HandlerMapping} implementation that supports {@link RouterFunction}s.
|
||||
* {@code HandlerMapping} implementation that supports {@link RouterFunction RouterFunctions}.
|
||||
* <p>If no {@link RouterFunction} is provided at
|
||||
* {@linkplain #RouterFunctionMapping(RouterFunction) construction time}, this mapping will detect
|
||||
* all router functions in the application context, and consult them in
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.web.reactive.result.view.ViewResolver;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* {@code HandlerResultHandler} implementation that supports {@link ServerResponse}s.
|
||||
* {@code HandlerResultHandler} implementation that supports {@link ServerResponse ServerResponses}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.0
|
||||
|
||||
@@ -100,7 +100,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
|
||||
* <p>Supports direct matches, e.g. a registered "/test" matches "/test",
|
||||
* and various path pattern matches, e.g. a registered "/t*" matches
|
||||
* both "/test" and "/team". For details, see the PathPattern class.
|
||||
* @param lookupPath URL the handler is mapped to
|
||||
* @param lookupPath the URL the handler is mapped to
|
||||
* @param exchange the current exchange
|
||||
* @return the associated handler instance, or {@code null} if not found
|
||||
* @see org.springframework.web.util.pattern.PathPattern
|
||||
|
||||
@@ -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.
|
||||
@@ -106,7 +106,7 @@ public class SimpleUrlHandlerMapping extends AbstractUrlHandlerMapping {
|
||||
|
||||
/**
|
||||
* Register all handlers specified in the URL map for the corresponding paths.
|
||||
* @param urlMap Map with URL paths as keys and handler beans or bean names as values
|
||||
* @param urlMap a Map with URL paths as keys and handler beans or bean names as values
|
||||
* @throws BeansException if a handler couldn't be registered
|
||||
* @throws IllegalStateException if there is a conflicting handler registered
|
||||
*/
|
||||
|
||||
@@ -42,8 +42,14 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
*/
|
||||
public class CachingResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
/**
|
||||
* The prefix used for resolved resource cache keys.
|
||||
*/
|
||||
public static final String RESOLVED_RESOURCE_CACHE_KEY_PREFIX = "resolvedResource:";
|
||||
|
||||
/**
|
||||
* The prefix used for resolved URL path cache keys.
|
||||
*/
|
||||
public static final String RESOLVED_URL_PATH_CACHE_KEY_PREFIX = "resolvedUrlPath:";
|
||||
|
||||
|
||||
|
||||
@@ -162,6 +162,9 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link LinkParser} implementations.
|
||||
*/
|
||||
protected abstract static class AbstractLinkParser implements LinkParser {
|
||||
|
||||
/** Return the keyword to use to search for links, e.g. "@import", "url(" */
|
||||
|
||||
@@ -56,6 +56,9 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
*/
|
||||
public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
/**
|
||||
* The default content codings.
|
||||
*/
|
||||
public static final List<String> DEFAULT_CODINGS = Arrays.asList("br", "gzip");
|
||||
|
||||
|
||||
@@ -107,8 +110,8 @@ public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
* <p>By default this is configured with {@literal ["br" -> ".br"]} and
|
||||
* {@literal ["gzip" -> ".gz"]}.
|
||||
* @param extensions the extensions to use.
|
||||
* @see #registerExtension(String, String)
|
||||
* @since 5.1
|
||||
* @see #registerExtension(String, String)
|
||||
*/
|
||||
public void setExtensions(Map<String, String> extensions) {
|
||||
extensions.forEach(this::registerExtension);
|
||||
@@ -188,6 +191,9 @@ public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An encoded {@link HttpResource}.
|
||||
*/
|
||||
static final class EncodedResource extends AbstractResource implements HttpResource {
|
||||
|
||||
private final Resource original;
|
||||
|
||||
@@ -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.
|
||||
@@ -79,6 +79,9 @@ public class GzipResourceResolver extends AbstractResourceResolver {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A gzipped {@link HttpResource}.
|
||||
*/
|
||||
static final class GzippedResource extends AbstractResource implements HttpResource {
|
||||
|
||||
private final Resource original;
|
||||
|
||||
@@ -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.
|
||||
@@ -25,7 +25,7 @@ import org.springframework.lang.Nullable;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A contract for invoking a chain of {@link ResourceResolver}s where each resolver
|
||||
* A contract for invoking a chain of {@link ResourceResolver ResourceResolvers} where each resolver
|
||||
* is given a reference to the chain allowing it to delegate when necessary.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -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.
|
||||
@@ -22,7 +22,7 @@ import org.springframework.core.io.Resource;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A contract for invoking a chain of {@link ResourceTransformer}s where each resolver
|
||||
* A contract for invoking a chain of {@link ResourceTransformer ResourceTransformers} where each resolver
|
||||
* is given a reference to the chain allowing it to delegate when necessary.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -160,7 +160,7 @@ public class ResourceWebHandler implements WebHandler, InitializingBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the list of {@link ResourceResolver}s to use.
|
||||
* Configure the list of {@link ResourceResolver ResourceResolvers} to use.
|
||||
* <p>By default {@link PathResourceResolver} is configured. If using this property,
|
||||
* it is recommended to add {@link PathResourceResolver} as the last resolver.
|
||||
*/
|
||||
@@ -179,7 +179,7 @@ public class ResourceWebHandler implements WebHandler, InitializingBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the list of {@link ResourceTransformer}s to use.
|
||||
* Configure the list of {@link ResourceTransformer ResourceTransformers} to use.
|
||||
* <p>By default no transformers are configured for use.
|
||||
*/
|
||||
public void setResourceTransformers(@Nullable List<ResourceTransformer> resourceTransformers) {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class VersionResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
private AntPathMatcher pathMatcher = new AntPathMatcher();
|
||||
|
||||
/** Map from path pattern -> VersionStrategy */
|
||||
/** Map from path pattern -> VersionStrategy. */
|
||||
private final Map<String, VersionStrategy> versionStrategyMap = new LinkedHashMap<>();
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -27,6 +27,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the value type
|
||||
*/
|
||||
abstract class AbstractNameValueExpression<T> implements NameValueExpression<T> {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -25,6 +25,8 @@ import java.util.Iterator;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of objects that this RequestCondition can be combined
|
||||
* with and compared to
|
||||
*/
|
||||
public abstract class AbstractRequestCondition<T extends AbstractRequestCondition<T>>
|
||||
implements RequestCondition<T> {
|
||||
|
||||
@@ -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,6 +24,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the value type
|
||||
*/
|
||||
public interface NameValueExpression<T> {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -27,11 +27,10 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* to each other via {@link #compareTo(Object, ServerWebExchange)} to determine
|
||||
* which is a closer match for a given request.
|
||||
*
|
||||
* @param <T> the type of objects that this RequestCondition can be combined
|
||||
* with and compared to
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the type of objects that this RequestCondition can be combined
|
||||
* with and compared to
|
||||
*/
|
||||
public interface RequestCondition<T> {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -32,7 +32,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A logical disjunction (' || ') request condition that matches a request
|
||||
* against a set of {@link RequestMethod}s.
|
||||
* against a set of {@link RequestMethod RequestMethods}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
@@ -66,7 +66,7 @@ public final class RequestMethodsRequestCondition extends AbstractRequestConditi
|
||||
|
||||
|
||||
/**
|
||||
* Returns all {@link RequestMethod}s contained in this condition.
|
||||
* Returns all {@link RequestMethod RequestMethods} contained in this condition.
|
||||
*/
|
||||
public Set<RequestMethod> getMethods() {
|
||||
return this.methods;
|
||||
|
||||
@@ -55,7 +55,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Brian Clozel
|
||||
* @since 5.0
|
||||
* @param <T> The mapping for a {@link HandlerMethod} containing the conditions
|
||||
* @param <T> the mapping for a {@link HandlerMethod} containing the conditions
|
||||
* needed to match the handler method to incoming request.
|
||||
*/
|
||||
public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMapping implements InitializingBean {
|
||||
|
||||
@@ -128,7 +128,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
* @param exchange the current exchange
|
||||
* @param bindingContext the binding context to use
|
||||
* @param providedArgs optional list of argument values to match by type
|
||||
* @return Mono with a {@link HandlerResult}.
|
||||
* @return a Mono with a {@link HandlerResult}.
|
||||
*/
|
||||
public Mono<HandlerResult> invoke(ServerWebExchange exchange, BindingContext bindingContext,
|
||||
Object... providedArgs) {
|
||||
|
||||
@@ -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.
|
||||
@@ -37,7 +37,7 @@ import org.springframework.web.util.pattern.PathPattern;
|
||||
import org.springframework.web.util.pattern.PathPatternParser;
|
||||
|
||||
/**
|
||||
* Encapsulates the following request mapping conditions:
|
||||
* Request mapping information. Encapsulates the following request mapping conditions:
|
||||
* <ol>
|
||||
* <li>{@link PatternsRequestCondition}
|
||||
* <li>{@link RequestMethodsRequestCondition}
|
||||
|
||||
@@ -303,7 +303,8 @@ public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMe
|
||||
|
||||
|
||||
/**
|
||||
* @param info RequestMappingInfo that matches the URL path
|
||||
* Create a new {@link PartialMatch} instance.
|
||||
* @param info the RequestMappingInfo that matches the URL path
|
||||
* @param exchange the current exchange
|
||||
*/
|
||||
public PartialMatch(RequestMappingInfo info, ServerWebExchange exchange) {
|
||||
|
||||
@@ -95,7 +95,7 @@ public class SyncInvocableHandlerMethod extends HandlerMethod {
|
||||
* @param exchange the current exchange
|
||||
* @param bindingContext the binding context to use
|
||||
* @param providedArgs optional list of argument values to match by type
|
||||
* @return Mono with a {@link HandlerResult}.
|
||||
* @return a Mono with a {@link HandlerResult}.
|
||||
* @throws ServerErrorException if method argument resolution or method invocation fails
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -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 abstract class AbstractMessageWriterResultHandler extends HandlerResultHa
|
||||
|
||||
|
||||
/**
|
||||
* Constructor with {@link HttpMessageWriter}s and a
|
||||
* Constructor with {@link HttpMessageWriter HttpMessageWriters} and a
|
||||
* {@code RequestedContentTypeResolver}.
|
||||
* @param messageWriters for serializing Objects to the response body stream
|
||||
* @param contentTypeResolver for resolving the requested content type
|
||||
|
||||
@@ -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.
|
||||
@@ -70,14 +70,15 @@ public abstract class AbstractNamedValueArgumentResolver extends HandlerMethodAr
|
||||
|
||||
|
||||
/**
|
||||
* @param factory a bean factory to use for resolving ${...} placeholder
|
||||
* and #{...} SpEL expressions in default values, or {@code null} if default
|
||||
* Create a new {@link AbstractNamedValueArgumentResolver} instance.
|
||||
* @param factory a bean factory to use for resolving {@code ${...}} placeholder
|
||||
* and {@code #{...}} SpEL expressions in default values, or {@code null} if default
|
||||
* values are not expected to contain expressions
|
||||
* @param registry for checking reactive type wrappers
|
||||
*/
|
||||
public AbstractNamedValueArgumentResolver(@Nullable ConfigurableBeanFactory factory,
|
||||
ReactiveAdapterRegistry registry) {
|
||||
|
||||
|
||||
super(registry);
|
||||
this.configurableBeanFactory = factory;
|
||||
this.expressionContext = (factory != null ? new BeanExpressionContext(factory, null) : null);
|
||||
|
||||
@@ -39,8 +39,9 @@ public abstract class AbstractNamedValueSyncArgumentResolver extends AbstractNam
|
||||
implements SyncHandlerMethodArgumentResolver {
|
||||
|
||||
/**
|
||||
* @param factory a bean factory to use for resolving ${...}
|
||||
* placeholder and #{...} SpEL expressions in default values;
|
||||
* Create a new {@link AbstractNamedValueSyncArgumentResolver}.
|
||||
* @param factory a bean factory to use for resolving {@code ${...}}
|
||||
* placeholder and {@code #{...}} SpEL expressions in default values;
|
||||
* or {@code null} if default values are not expected to have expressions
|
||||
* @param registry for checking reactive type wrappers
|
||||
*/
|
||||
|
||||
@@ -55,7 +55,8 @@ import static org.springframework.core.MethodIntrospector.*;
|
||||
/**
|
||||
* Package-private class to assist {@link RequestMappingHandlerAdapter} with
|
||||
* resolving, initializing, and caching annotated methods declared in
|
||||
* {@code @Controller} and {@code @ControllerAdvice} components:
|
||||
* {@code @Controller} and {@code @ControllerAdvice} components. Assists with
|
||||
* the following annotations:
|
||||
* <ul>
|
||||
* <li>{@code @InitBinder}
|
||||
* <li>{@code @ModelAttribute}
|
||||
|
||||
@@ -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.
|
||||
@@ -39,8 +39,9 @@ import org.springframework.web.server.ServerWebInputException;
|
||||
public class CookieValueMethodArgumentResolver extends AbstractNamedValueSyncArgumentResolver {
|
||||
|
||||
/**
|
||||
* @param factory a bean factory to use for resolving ${...}
|
||||
* placeholder and #{...} SpEL expressions in default values;
|
||||
* Create a new {@link CookieValueMethodArgumentResolver} instance.
|
||||
* @param factory a bean factory to use for resolving {@code ${...}}
|
||||
* placeholder and {@code #{...}} SpEL expressions in default values;
|
||||
* or {@code null} if default values are not expected to contain expressions
|
||||
* @param registry for checking reactive type wrappers
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
@@ -37,8 +37,9 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueSyncArgumentResolver {
|
||||
|
||||
/**
|
||||
* @param factory a bean factory to use for resolving ${...}
|
||||
* placeholder and #{...} SpEL expressions in default values;
|
||||
* Create a new {@link ExpressionValueMethodArgumentResolver} instance.
|
||||
* @param factory a bean factory to use for resolving {@code ${...}}
|
||||
* placeholder and {@code #{...}} SpEL expressions in default values;
|
||||
* or {@code null} if default values are not expected to contain expressions
|
||||
* @param registry for checking reactive type wrappers
|
||||
*/
|
||||
|
||||
@@ -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,9 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
public class PathVariableMethodArgumentResolver extends AbstractNamedValueSyncArgumentResolver {
|
||||
|
||||
/**
|
||||
* @param factory a bean factory to use for resolving ${...}
|
||||
* placeholder and #{...} SpEL expressions in default values;
|
||||
* Create a new {@link PathVariableMethodArgumentResolver}.
|
||||
* @param factory a bean factory to use for resolving {@code ${...}}
|
||||
* placeholder and {@code #{...}} SpEL expressions in default values;
|
||||
* or {@code null} if default values are not expected to contain expressions
|
||||
* @param registry for checking reactive type wrappers
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
@@ -40,8 +40,9 @@ public class RequestAttributeMethodArgumentResolver extends AbstractNamedValueSy
|
||||
|
||||
|
||||
/**
|
||||
* @param factory a bean factory to use for resolving ${...}
|
||||
* placeholder and #{...} SpEL expressions in default values;
|
||||
* Create a new {@link RequestAttributeMethodArgumentResolver} instance.
|
||||
* @param factory a bean factory to use for resolving {@code ${...}}
|
||||
* placeholder and {@code #{...}} SpEL expressions in default values;
|
||||
* or {@code null} if default values are not expected to have expressions
|
||||
* @param registry for checking reactive type wrappers
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
@@ -48,8 +48,9 @@ import org.springframework.web.server.ServerWebInputException;
|
||||
public class RequestHeaderMethodArgumentResolver extends AbstractNamedValueSyncArgumentResolver {
|
||||
|
||||
/**
|
||||
* @param factory a bean factory to use for resolving ${...}
|
||||
* placeholder and #{...} SpEL expressions in default values;
|
||||
* Create a new {@link RequestHeaderMethodArgumentResolver} instance.
|
||||
* @param factory a bean factory to use for resolving {@code ${...}}
|
||||
* placeholder and {@code #{...}} SpEL expressions in default values;
|
||||
* or {@code null} if default values are not expected to have expressions
|
||||
* @param registry for checking reactive type wrappers
|
||||
*/
|
||||
|
||||
@@ -47,11 +47,11 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
*/
|
||||
public abstract class AbstractView implements View, BeanNameAware, ApplicationContextAware {
|
||||
|
||||
/** Well-known name for the RequestDataValueProcessor in the bean factory */
|
||||
/** Well-known name for the RequestDataValueProcessor in the bean factory. */
|
||||
public static final String REQUEST_DATA_VALUE_PROCESSOR_BEAN_NAME = "requestDataValueProcessor";
|
||||
|
||||
|
||||
/** Logger that is available to subclasses */
|
||||
/** Logger that is available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private static final Object NO_VALUE = new Object();
|
||||
@@ -177,7 +177,7 @@ public abstract class AbstractView implements View, BeanNameAware, ApplicationCo
|
||||
|
||||
/**
|
||||
* Prepare the model to render.
|
||||
* @param model Map with name Strings as keys and corresponding model
|
||||
* @param model a Map with name Strings as keys and corresponding model
|
||||
* objects as values (Map can also be {@code null} in case of empty model)
|
||||
* @param contentType the content type selected to render with which should
|
||||
* match one of the {@link #getSupportedMediaTypes() supported media types}.
|
||||
|
||||
@@ -283,7 +283,7 @@ public class RedirectView extends AbstractUrlBasedView {
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a redirect back to the HTTP client
|
||||
* Send a redirect back to the HTTP client.
|
||||
* @param targetUrl the target URL to redirect to
|
||||
* @param exchange current exchange
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
@@ -87,6 +87,8 @@ public interface Rendering {
|
||||
|
||||
/**
|
||||
* Defines a builder for {@link Rendering}.
|
||||
*
|
||||
* @param <B> a self reference to the builder type
|
||||
*/
|
||||
interface Builder<B extends Builder<B>> {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -243,7 +243,7 @@ public class RequestContext {
|
||||
/**
|
||||
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
|
||||
* @param code code of the message
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, String defaultMessage) {
|
||||
@@ -254,7 +254,7 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, @Nullable Object[] args, String defaultMessage) {
|
||||
@@ -265,7 +265,7 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message as a List, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, @Nullable List<?> args, String defaultMessage) {
|
||||
@@ -276,8 +276,8 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param htmlEscape HTML escape the message?
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @param htmlEscape if the message should be HTML-escaped
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, @Nullable Object[] args, String defaultMessage, boolean htmlEscape) {
|
||||
@@ -324,7 +324,7 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param htmlEscape HTML escape the message?
|
||||
* @param htmlEscape if the message should be HTML-escaped
|
||||
* @return the message
|
||||
* @throws org.springframework.context.NoSuchMessageException if not found
|
||||
*/
|
||||
@@ -346,7 +346,7 @@ public class RequestContext {
|
||||
/**
|
||||
* Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance).
|
||||
* @param resolvable the MessageSourceResolvable
|
||||
* @param htmlEscape HTML escape the message?
|
||||
* @param htmlEscape if the message should be HTML-escaped
|
||||
* @return the message
|
||||
* @throws org.springframework.context.NoSuchMessageException if not found
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,7 @@ public interface View {
|
||||
/**
|
||||
* Render the view based on the given {@link HandlerResult}. Implementations
|
||||
* can access and use the model or only a specific attribute in it.
|
||||
* @param model Map with name Strings as keys and corresponding model
|
||||
* @param model a Map with name Strings as keys and corresponding model
|
||||
* objects as values (Map can also be {@code null} in case of empty model)
|
||||
* @param contentType the content type selected to render with which should
|
||||
* match one of the {@link #getSupportedMediaTypes() supported media types}.
|
||||
|
||||
@@ -34,6 +34,9 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public abstract class ViewResolverSupport implements Ordered {
|
||||
|
||||
/**
|
||||
* The default {@link MediaType content-type} for views.
|
||||
*/
|
||||
public static final MediaType DEFAULT_CONTENT_TYPE = MediaType.parseMediaType("text/html;charset=UTF-8");
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -133,7 +133,7 @@ public class ScriptTemplateConfigurer implements ScriptTemplateConfig {
|
||||
* {@link #setEngineName(String)}. Using {@link #setEngine(ScriptEngine)} is not
|
||||
* possible because multiple instances of the script engine need to be created for
|
||||
* each request.
|
||||
* @see <a href="http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html#getParameter-java.lang.String-">THREADING ScriptEngine parameter<a/>
|
||||
* @see <a href="http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html#getParameter-java.lang.String-">THREADING ScriptEngine parameter</a>
|
||||
*/
|
||||
public void setSharedEngine(@Nullable Boolean sharedEngine) {
|
||||
this.sharedEngine = sharedEngine;
|
||||
|
||||
@@ -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.
|
||||
@@ -50,6 +50,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
* @author Violeta Georgieva
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the native delegate type
|
||||
*/
|
||||
public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSocketSession<T>
|
||||
implements Subscriber<Void> {
|
||||
@@ -162,12 +163,12 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
|
||||
// WebSocketHandler adapter delegate methods
|
||||
|
||||
/** Handle a message callback from the WebSocketHandler adapter */
|
||||
/** Handle a message callback from the WebSocketHandler adapter. */
|
||||
void handleMessage(Type type, WebSocketMessage message) {
|
||||
this.receivePublisher.handleMessage(message);
|
||||
}
|
||||
|
||||
/** Handle an error callback from the WebSocketHandler adapter */
|
||||
/** Handle an error callback from the WebSocketHandler adapter. */
|
||||
void handleError(Throwable ex) {
|
||||
this.receivePublisher.onError(ex);
|
||||
WebSocketSendProcessor sendProcessor = this.sendProcessor;
|
||||
@@ -177,7 +178,7 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
}
|
||||
}
|
||||
|
||||
/** Handle a close callback from the WebSocketHandler adapter */
|
||||
/** Handle a close callback from the WebSocketHandler adapter. */
|
||||
void handleClose(CloseStatus reason) {
|
||||
this.receivePublisher.onAllDataRead();
|
||||
WebSocketSendProcessor sendProcessor = this.sendProcessor;
|
||||
@@ -259,6 +260,9 @@ public abstract class AbstractListenerWebSocketSession<T> extends AbstractWebSoc
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Processor to send web socket messages.
|
||||
*/
|
||||
protected final class WebSocketSendProcessor extends AbstractListenerWriteProcessor<WebSocketMessage> {
|
||||
|
||||
private volatile boolean isReady = true;
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the native delegate type
|
||||
*/
|
||||
public abstract class AbstractWebSocketSession<T> implements WebSocketSession {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -34,11 +34,12 @@ import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
|
||||
/**
|
||||
* Base class for Netty-based {@link WebSocketSession} adapters that provides
|
||||
* convenience methods to convert Netty {@link WebSocketFrame}s to and from
|
||||
* {@link WebSocketMessage}s.
|
||||
* convenience methods to convert Netty {@link WebSocketFrame WebSocketFrames} to and from
|
||||
* {@link WebSocketMessage WebSocketMessages}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @param <T> the native delegate type
|
||||
*/
|
||||
public abstract class NettyWebSocketSessionSupport<T> extends AbstractWebSocketSession<T> {
|
||||
|
||||
|
||||
@@ -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) {
|
||||
@@ -122,8 +122,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,7 +132,7 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the configured {@code Consumer<ConnectionBuilder}.
|
||||
* Return the configured <code>Consumer<ConnectionBuilder></code>.
|
||||
*/
|
||||
public Consumer<ConnectionBuilder> getConnectionBuilderConsumer() {
|
||||
return this.builderConsumer;
|
||||
|
||||
Reference in New Issue
Block a user