Separate out web.server from http.server.reactive
This change separates out lower-level HTTP adapter code from the more (framework-specific) HTTP processing into a separate package under org.springframework.web.server (not under org.springframework.http).
This commit is contained in:
parent
94be412327
commit
54e4e012b2
|
@ -22,9 +22,6 @@ import reactor.Mono;
|
|||
* Contract for handling HTTP requests in a non-blocking way.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Sebastien Deleuze
|
||||
* @see HttpFilter
|
||||
*/
|
||||
public interface HttpHandler {
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.springframework.web.reactive;
|
|||
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.HttpExceptionHandler;
|
||||
import org.springframework.web.server.HttpExceptionHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.web.ResponseStatusException;
|
||||
|
|
|
@ -13,13 +13,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
|
@ -13,7 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
@ -21,6 +21,10 @@ import java.util.List;
|
|||
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
||||
/**
|
||||
* {@link HttpHandler} that delegates to a chain of {@link HttpFilter}s followed
|
||||
* by a target {@link HttpHandler}.
|
|
@ -13,10 +13,14 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
||||
/**
|
||||
* A contract for resolving exceptions from HTTP request handling.
|
||||
*
|
|
@ -14,11 +14,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
||||
/**
|
||||
* Contract for interception-style, chained processing of HTTP requests.
|
||||
*
|
|
@ -13,10 +13,13 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
||||
/**
|
||||
* Represents a chain of {@link HttpFilter}s allowing each {@link HttpFilter} to
|
||||
* delegate to the next in the chain.
|
|
@ -13,10 +13,13 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
|
@ -13,11 +13,13 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
||||
/**
|
||||
* Handle any exception by setting the response status to 500.
|
|
@ -37,11 +37,11 @@ import org.springframework.http.HttpMethod;
|
|||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.ResponseStatusException;
|
||||
import org.springframework.http.server.reactive.ErrorHandlingHttpHandler;
|
||||
import org.springframework.http.server.reactive.FilterChainHttpHandler;
|
||||
import org.springframework.http.server.reactive.HttpExceptionHandler;
|
||||
import org.springframework.http.server.reactive.HttpFilter;
|
||||
import org.springframework.http.server.reactive.HttpFilterChain;
|
||||
import org.springframework.web.server.ErrorHandlingHttpHandler;
|
||||
import org.springframework.web.server.FilterChainHttpHandler;
|
||||
import org.springframework.web.server.HttpExceptionHandler;
|
||||
import org.springframework.web.server.HttpFilter;
|
||||
import org.springframework.web.server.HttpFilterChain;
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.MockServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.MockServerHttpResponse;
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.springframework.http.HttpStatus;
|
|||
import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests;
|
||||
import org.springframework.http.server.reactive.ErrorHandlingHttpHandler;
|
||||
import org.springframework.web.server.ErrorHandlingHttpHandler;
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
|
||||
import java.net.URI;
|
||||
|
@ -27,6 +27,14 @@ import reactor.rx.stream.Signal;
|
|||
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.MockServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.MockServerHttpResponse;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.web.server.ErrorHandlingHttpHandler;
|
||||
import org.springframework.web.server.HttpExceptionHandler;
|
||||
import org.springframework.web.server.InternalServerErrorExceptionHandler;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
|
@ -13,7 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.http.server.reactive;
|
||||
package org.springframework.web.server;
|
||||
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -22,6 +22,10 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import reactor.Mono;
|
||||
|
||||
import org.springframework.http.server.reactive.HttpHandler;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
Loading…
Reference in New Issue