Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 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,10 +24,10 @@ import org.springframework.http.codec.HttpMessageReader;
|
||||
import org.springframework.http.codec.HttpMessageWriter;
|
||||
|
||||
/**
|
||||
* Defines the strategies for invoking {@link ExchangeFunction}s. 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.
|
||||
* Provides strategies for use in an {@link ExchangeFunction}.
|
||||
*
|
||||
* <p>To create an instance, see the static methods {@link #withDefaults()},
|
||||
* {@link #builder()}, and {@link #empty()}.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @author Arjen Poutsma
|
||||
@@ -36,31 +36,32 @@ import org.springframework.http.codec.HttpMessageWriter;
|
||||
public interface ExchangeStrategies {
|
||||
|
||||
/**
|
||||
* Return the {@link HttpMessageReader}s to be used for request body conversion.
|
||||
* @return the stream of message readers
|
||||
* Return {@link HttpMessageReader HttpMessageReaders} to read and decode the response body with.
|
||||
* @return the message readers
|
||||
*/
|
||||
List<HttpMessageReader<?>> messageReaders();
|
||||
|
||||
/**
|
||||
* Return the {@link HttpMessageWriter}s to be used for response body conversion.
|
||||
* @return the stream of message writers
|
||||
* Return {@link HttpMessageWriter HttpMessageWriters} to write and encode the request body with.
|
||||
* @return the message writers
|
||||
*/
|
||||
List<HttpMessageWriter<?>> messageWriters();
|
||||
|
||||
|
||||
// Static methods
|
||||
// Static builder methods
|
||||
|
||||
/**
|
||||
* Return a new {@code ExchangeStrategies} with default initialization.
|
||||
* @return the new {@code ExchangeStrategies}
|
||||
* Return a new {@code ExchangeStrategies} instance with default configuration
|
||||
* provided by {@link ClientCodecConfigurer}.
|
||||
*/
|
||||
static ExchangeStrategies withDefaults() {
|
||||
return builder().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a mutable builder for a {@code ExchangeStrategies} with default initialization.
|
||||
* @return the builder
|
||||
* Return a builder pre-configured with default configuration to start.
|
||||
* This is the same as {@link #withDefaults()} but returns a mutable builder
|
||||
* for further customizations.
|
||||
*/
|
||||
static Builder builder() {
|
||||
DefaultExchangeStrategiesBuilder builder = new DefaultExchangeStrategiesBuilder();
|
||||
@@ -69,8 +70,7 @@ public interface ExchangeStrategies {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a mutable, empty builder for a {@code ExchangeStrategies}.
|
||||
* @return the builder
|
||||
* Return a builder with empty configuration to start.
|
||||
*/
|
||||
static Builder empty() {
|
||||
return new DefaultExchangeStrategiesBuilder();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -28,10 +28,11 @@ 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
|
||||
* 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.
|
||||
* Defines the strategies to be used for processing {@link HandlerFunction HandlerFunctions}.
|
||||
*
|
||||
* <p>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.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Juergen Hoeller
|
||||
@@ -78,7 +79,7 @@ public interface HandlerStrategies {
|
||||
LocaleContextResolver localeContextResolver();
|
||||
|
||||
|
||||
// Static methods
|
||||
// Static builder methods
|
||||
|
||||
/**
|
||||
* Return a new {@code HandlerStrategies} with default initialization.
|
||||
|
||||
Reference in New Issue
Block a user