Rename CorsProcessor#processRequest to process

This commit is contained in:
Sebastien Deleuze
2017-06-19 15:55:33 +02:00
parent f092ae567b
commit 59e90943e4
4 changed files with 26 additions and 26 deletions

View File

@@ -23,8 +23,8 @@ import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.server.ServerWebExchange;
/**
* A strategy that takes a reactive request and a {@link CorsConfiguration} and updates
* the response.
* A strategy that takes a reactive HTTP exchange and a {@link CorsConfiguration} and
* updates the response.
*
* <p>This component is not concerned with how a {@code CorsConfiguration} is
* selected but rather takes follow-up actions such as applying CORS validation
@@ -39,11 +39,11 @@ import org.springframework.web.server.ServerWebExchange;
public interface CorsProcessor {
/**
* Process a request given a {@code CorsConfiguration}.
* Process an HTTP exchange given a {@code CorsConfiguration}.
* @param configuration the applicable CORS configuration (possibly {@code null})
* @param exchange the current HTTP request / response
* @return a {@link Mono} emitting {@code false} if the request is rejected, {@code true} otherwise
*/
boolean processRequest(@Nullable CorsConfiguration configuration, ServerWebExchange exchange);
boolean process(@Nullable CorsConfiguration configuration, ServerWebExchange exchange);
}

View File

@@ -52,7 +52,7 @@ public class DefaultCorsProcessor implements CorsProcessor {
@Override
public boolean processRequest(@Nullable CorsConfiguration config, ServerWebExchange exchange) {
public boolean process(@Nullable CorsConfiguration config, ServerWebExchange exchange) {
ServerHttpRequest request = exchange.getRequest();
ServerHttpResponse response = exchange.getResponse();