- 15 12月, 2016 1 次提交
-
-
由 Arjen Poutsma 提交于
-
- 14 12月, 2016 1 次提交
-
-
由 Arjen Poutsma 提交于
This commit makes it possible for handler functions to return asynchronous status codes and headers, by making HandlerFunction.handle return a Mono<ServerResponse> instead of a ServerResponse. As a consequence, all other types that deal with HandlerFunctions (RouterFunction, HandlerFilterFunction, etc.) had to change as well. However, when combining the above change with method references (a very typical use case), resulting signatures would have been something like: ``` public Mono<ServerResponse<Mono<Person>>> getPerson(ServerRequest request) ``` which was too ugly to consider, especially the two uses of Mono. It was considered to merge ServerResponse with the last Mono, essentialy making ServerResponse always contain a Publisher, but this had unfortunate consequences in view rendering. It was therefore decided to drop the parameterization of ServerResponse, as the only usage of the extra type information was to manipulate the response objects in a filter. Even before the above change this was suggested; it just made the change even more necessary. As a consequence, `BodyInserter` could be turned into a real `FunctionalInterface`, which resulted in changes in ClientRequest. We did, however, make HandlerFunction.handle return a `Mono<? extends ServerResponse>`, adding little complexity, but allowing for future `ServerResponse` subtypes that do expose type information, if it's needed. For instance, a RenderingResponse could expose the view name and model. Issue: SPR-14870
-
- 03 11月, 2016 1 次提交
-
-
由 Sebastien Deleuze 提交于
Issue: SPR-14800
-
- 02 11月, 2016 1 次提交
-
-
由 Sebastien Deleuze 提交于
- ScriptedSubscriber has been renamed to Verifier - The Publisher is passed to create() instead of verify() - No more need to specify the generic type explicitly - Version is now sync with reactor-core Issue: SPR-14800
-
- 25 10月, 2016 1 次提交
-
-
由 Brian Clozel 提交于
Reactor recently added the `ScriptedSubscriber` in its new `reactor-addons` module. This `Subscriber` revissits the previous `TestSubscriber` with many improvements, including: * scripting each expectation * builder API that guides you until the final verification step * virtual time support This commit refactor all existing tests to use this new infrastructure and removed the `TestSubscriber` implementation. Issue: SPR-14800
-
- 20 10月, 2016 3 次提交
-
-
由 Arjen Poutsma 提交于
This commit changes web.reactive.function to reflect the introduction of the new WebClient. Changes include: - Request -> ServerRequest - Response -> ServerResponse - FilterFunction -> HandlerFilterFunction - StrategiesSupplier -> HandlerStrategies
-
由 Arjen Poutsma 提交于
This commit refactors the web client to be more similar to web.reactive.function. Changes include: - Refactor ClientWebRequest to immutable ClientRequest with builder and support for BodyInserters. - Introduce ClientResponse which exposes headers, status, and support for reading from the body with BodyExtractors. - Removed ResponseErrorHandler, in favor of having a ClientResponse with "error" status code (i.e. 4xx or 5xx). Also removed WebClientException and subclasses. - Refactored WebClientConfig to WebClientStrategies. - Refactored ClientHttpRequestInterceptor to ExchangeFilterFunction. - Removed ClientWebRequestPostProcessor in favor of ExchangeFilterFunction, which allows for asynchronous execution. Issue: SPR-14827
-
由 Arjen Poutsma 提交于
This commit moves the web.reactive.function.[BodyInserter|BodyExtractor] to http.codec, so that they can be used from the client as well. Furthermore, it parameterized both inserter and extractor over ReactiveHttpOutputMessage and ReactiveHttpInputMessage respectively, so that they can be limited to only be used on the client or server.
-
- 17 9月, 2016 6 次提交
-
-
由 Arjen Poutsma 提交于
-
由 Arjen Poutsma 提交于
-
由 Arjen Poutsma 提交于
-
由 Arjen Poutsma 提交于
This commit refactors the response body extraction logic into a separate function: BodyExtractor. Standard populators can be found in BodyExtractors.
-
由 Arjen Poutsma 提交于
This commit extracts the response body insertion logic into a separate strategy interface: BodyPopulator. Standard populators can be found in BodyPopulators.
-
由 Arjen Poutsma 提交于
This commit refactors the Router into a RoutingFunctions class, by: - Renaming the class :) - Moving all Configuration logic into a separate, top-level Configuration class with mutable builder.
-
- 12 9月, 2016 1 次提交
-
-
由 Arjen Poutsma 提交于
In RoutingFunction, renamed 'and' to 'andSame', and 'andOther' to 'and' to make the commonly used method name shorter.
-
- 01 9月, 2016 2 次提交
-
-
由 Arjen Poutsma 提交于
This commit introduces a new, functional web programming model in the org.springframework.web.reactive.function package. The key types are: - Request and Response are new Java 8-DSLs for access to the HTTP request and response - HandlerFunction represents a function to handle a request to a response - RoutingFunction maps a request to a HandlerFunction - FilterFunction filters a routing as defined by a RoutingFunction - RequestPredicate is used by Router to create RoutingFunctions - RequestPredicates offers common RequestPredicate instances
-
由 Arjen Poutsma 提交于
- Renamed SseEvent to ServerSentEvent to make the name less redundant. - ServerSentEvent is now immutable, having a builder to create new instances. - Realigned the class properties to more closely match the events described in the spec, so that `reconnectTime` becomes `retry`, and `name` becomes `event`.
-
- 31 8月, 2016 1 次提交
-
-
由 Rossen Stoyanchev 提交于
This commit updates the instructions on getting started with Spring Web Reactive and also updates constructors and setters to streamline the getting started procedure. Issue: SPR-14640
-
- 08 8月, 2016 1 次提交
-
-
由 Sebastien Deleuze 提交于
reactor.test.TestSubscriber will not be part of Reactor Core 3.0.0 since it needs to be refactored to fit all the needs expressed by the users. It is likely to be back later in one of the Reactor Core 3.0.x releases. This commit anticipate this removal by temporarily copying TestSubscriber in spring-core test classes. As soon as the new TestSubscriber will be available in Reactor Core, Spring Framework reactive tests will use it again.
-
- 28 7月, 2016 1 次提交
-
-
由 Rossen Stoyanchev 提交于
-
- 23 7月, 2016 1 次提交
-
-
由 Rossen Stoyanchev 提交于
-
- 21 7月, 2016 1 次提交
-
-
由 Arjen Poutsma 提交于
This commit changes the reactive flushing mechanism to use a newly introduced writeAndFlushWith(Publisher<Publisher<DataBuffer>>) on ReactiveHttpOutputMessage instead of using the FlushingDataBuffer. Issue: https://github.com/spring-projects/spring-reactive/issues/125
-
- 19 7月, 2016 1 次提交
-
-
由 Rossen Stoyanchev 提交于
-
- 16 7月, 2016 2 次提交
-
-
由 Rossen Stoyanchev 提交于
- 15 7月, 2016 1 次提交
-
-
由 Rossen Stoyanchev 提交于
-
- 08 7月, 2016 1 次提交
-
-
由 Brian Clozel 提交于
This commit refactors the `ClientHttpRequestFactory` into an `ClientHttpConnector` abstraction, in order to reflect that `ClientHttpRequest`s only "exist" once the client is connected to the origin server. This is why the HTTP client is now callback-based, containing all interactions with the request within a `Function<ClientHttpRequest,Mono<Void>>` that signals when it's done writing to the request. The `ClientHttpRequest` contract also adopts `setComplete()` and promotes that method to the `ReactiveHttpOutputMessage` contract. This commit also adapts all other APIs to that change and fixes a few issues, including: * use `HttpMessageConverter`s instead of `Encoders`/`Decoders` * better handle type information about request content publishers * support client cookies in HTTP requests * temporarily remove the RxNetty client support
-
- 01 7月, 2016 1 次提交
-
-
由 Rossen Stoyanchev 提交于
-
- 30 6月, 2016 1 次提交
-
-
由 Sebastien Deleuze 提交于
-
- 29 6月, 2016 1 次提交
-
-
由 Sebastien Deleuze 提交于
-
- 27 6月, 2016 1 次提交
-
-
由 Sebastien Deleuze 提交于
-
- 24 6月, 2016 4 次提交
-
-
由 Sebastien Deleuze 提交于
CodecHttpMessageConverter is now suitable for SSE since it now handles default content type.
-
由 Arjen Poutsma 提交于
Reactored Servlet 3.1 and Undertow response support into an AbstractResponseBodySubscriber that uses an internal state machine, making thread-safity a lot easier.
-
由 Sebastien Deleuze 提交于
-
由 Sebastien Deleuze 提交于
Flux<SseEvent> is Spring Web Reactive equivalent to Spring MVC SseEmitter type. It allows to send Server-Sent Events in a reactive way. Sending Flux<String> or Flux<Pojo> is equivalent to sending Flux<SseEvent> with the data property set to the String or Pojo value. For example: @RestController public class SseController { @RequestMapping("/sse/string") Flux<String> string() { return Flux.interval(Duration.ofSeconds(1)).map(l -> "foo " + l); } @RequestMapping("/sse/person") Flux<Person> person() { return Flux.interval(Duration.ofSeconds(1)).map(l -> new Person(Long.toString(l), "foo", "bar")); } @RequestMapping("/sse-raw") Flux<SseEvent> sse() { return Flux.interval(Duration.ofSeconds(1)).map(l -> { SseEvent event = new SseEvent(); event.setId(Long.toString(l)); event.setData("foo\nbar"); event.setComment("bar\nbaz"); return event; }); } }
-