Commit Graph

260 Commits

Author SHA1 Message Date
Rob Winch
ececec21f7 Update to Gradle 2.12 2016-03-17 10:11:28 -05:00
Rob Winch
62753102dc Ensure a consistent netty version
Currently there are clashes between io.netty:netty-common:4.1.0.Beta7 and
io.netty:netty-all:4.1.0.CR3 which can cause errors in the build related
to "VerifyError: Bad type on operand stack".

One solution would be to exclude the jars that duplicate the classes.
However, this can be fragile since additional dependencies may be added
that bring in the dependency transitively.

This commit locks the version for any artifiact with the group "io.nettty"
to ensure the correct version of netty is used.
2016-03-17 10:11:12 -05:00
Arjen Poutsma
10a04b0769 Test improvements. 2016-03-17 10:21:04 +01:00
Stephane Maldini
530c817287 sync reactor-netty 2016-03-12 01:16:49 +00:00
Stephane Maldini
13ddfb4aab update package 2016-03-11 22:15:11 +00:00
Stephane Maldini
f02492e15f sync with reactor-core and reactor-io 2016-03-11 20:02:34 +00:00
Rossen Stoyanchev
e97a55ad54 WebClient supports Void response body
WebResponseExtractor uses Mono.when with the response status, headers,
and the decoded body. However when the response body stream is empty
then when completes empty too.

This change adds defaultIfEmpty handling for en empty response body.
2016-03-07 17:07:12 -05:00
Rossen Stoyanchev
b2648f84ad DefaultWebSessionManager supports multiple sessions
Issue: #64
2016-03-07 11:20:51 -05:00
Stephane Maldini
1eadee5655 integration build with Reactor Core 2.5.0.M2 2016-03-07 13:57:27 +00:00
Rossen Stoyanchev
ca7aeaae35 WebSessionIdResolver now returns List of ids
Issue: #64
2016-03-03 22:32:03 -05:00
Rossen Stoyanchev
dbc6478b8a Refactor HTTP Cookie support
There is now an HttpCookie (simple name-value pair) and separately a
ServerHttpCookie sub-class with additional attributes that a server
can send to clients.

HttpHeaders is no longer the place to access cookies. Instead there is
a read-only HttpCookie map on ServerHttpRequest and a mutable
ServerHttpCookie map on ServerHttpResponse.

Cookies are stored in a map that preserves their order.
2016-03-03 22:17:39 -05:00
Stephane Maldini
a8c777b35f Remove reference to Fluxion 2016-03-04 00:05:35 +00:00
Stephane Maldini
ce4a687cf2 remove reactor-stream and related artefacts, update tests 2016-03-03 23:57:03 +00:00
Sebastien Deleuze
379ce6354e Update for latest Reactor Core Snapshot 2016-03-01 22:19:54 +01:00
Sebastien Deleuze
dc52d4c31f Update for latest Reactor Core Snapshot 2016-03-01 22:07:54 +01:00
Stephane Maldini
14948d4241 sync reactor 2016-03-01 20:50:55 +00:00
Stephane Maldini
4197f002d8 Arrange WriteWithOperator to save some allocation cost with the same technique used by RSC and Reactor 2016-02-28 11:49:00 +00:00
Stephane Maldini
423a4852c5 use EmptySubscription 2016-02-28 11:29:46 +00:00
Stephane Maldini
fc1b2e96f7 Introduce Mono#justOrEmpty(T) 2016-02-28 00:56:10 +00:00
Stephane Maldini
999dfe3925 Sync BaseSubscriber 2016-02-27 23:18:22 +00:00
Stephane Maldini
24d9e99de1 Sync toCompletableFuture 2016-02-27 21:36:31 +00:00
Stephane Maldini
cc77a338b1 Sync reactor-core jdk8 bump 2016-02-27 13:34:15 +00:00
Stephane Maldini
4c477189a6 revert module Reactor Fluxion to Reactor Stream 2016-02-27 11:06:07 +00:00
Stephane Maldini
9f94f8c88e Sync to Fluxion to remove Stream confusion 2016-02-26 21:42:52 +00:00
Arjen Poutsma
361707c448 Servlet 3.1 support cleanup
Claneup of the Servlet 3.1 support:

 - moved RequestBodyPublisher to ServletServerHttpRequest
 - moved ResponseBodySubscribera to ServletServerHttpResponse
 - response body is now copied to ServletOutputStream in chunks, rather
   than one big byte[]
2016-02-23 14:35:49 +01:00
Arjen Poutsma
2fcbeb6595 Fixed issue with DefaultDataBuffer.asInputStream() 2016-02-23 14:14:34 +01:00
Stephane Maldini
f920d2ce1e sync with reactor-stream update 2016-02-23 09:39:49 +00:00
Arjen Poutsma
51a90465d4 Polishing 2016-02-23 10:24:18 +01:00
Arjen Poutsma
f036f745a6 Improved RxNetty support. 2016-02-18 15:49:45 +01:00
Brian Clozel
d68ff29e9b Use default buffer allocator in RequestMappingHandlerAdapter
This commit removes RequestMappingHandlerAdapter's hard dependency on
Netty by switching to the DefaultDataBufferAllocator.
2016-02-10 23:16:48 +01:00
Sebastien Deleuze
628ae2fda8 Use Flux instead of Stream in Publisher based integration tests 2016-02-09 18:02:02 +01:00
Sebastien Deleuze
36788207f3 Polish RequestMappingIntegrationTests 2016-02-09 17:53:26 +01:00
Rossen Stoyanchev
3ca1d33905 Merge templating branch 2016-02-08 18:14:42 -05:00
Rossen Stoyanchev
971ca6beb8 Add HTML rendering integration test 2016-02-08 18:13:42 -05:00
Rossen Stoyanchev
29db80c3e8 Add FreeMarker View, ViewResolver and basic hierarchy 2016-02-08 18:13:42 -05:00
Rossen Stoyanchev
55d37c0522 Add View, ViewResolver, and ViewResolverResultHandler
This commit adds a View and ViewResolver contracts to support HTML
template based rendering.

ViewResolverResultHandler applies view resolution by iterating the
resolvers to resolve to a view and then use it to render.
2016-02-08 18:13:37 -05:00
Rossen Stoyanchev
14997eccf3 Support Model as method argument and in HandlerResult
A model is created and passed to argument resolvers including a new
ModelArgumentResolver. The model is then exposed for result handling
as a field in HandlerResult.
2016-02-08 18:04:07 -05:00
Rossen Stoyanchev
e92174c772 Update HandlerResult
Rename result to returnValue and resultType to returnValueType to
reflect what they represent.

The returnValue getter is also wrapped as Optional since the value
returned from a handler may be null (e.g. void method, null value).
2016-02-07 21:50:56 -05:00
Stephane Maldini
b7b423a003 Remove Stream#toBlockingQueue use 2016-02-08 00:25:52 +00:00
Arjen Poutsma
4a24979181 Various DataBuffer utility enhancements
- Javadoc for DataBufferUtils
 - Introduction of DataBufferTestUtils, containing methods for dumping
   the entire contents of a buffer
2016-02-05 14:31:48 +01:00
Stephane Maldini
52292cafae sync reactor-core scheduler 2016-02-04 03:08:26 +00:00
Brian Clozel
7ab92cfccf Add WebResponseExtractor impl for RxJava1
This commit adds `RxJava1WebResponseExtractors`, a static factory of
`WebResponseExtractor`s that are based on the RxJava1 composition API.
All extracted types are based on the `Single` and `Observable` types.
2016-02-02 14:06:02 +01:00
Brian Clozel
69ce33e1ee Add WebClient and its WebResponseExtractor API
This commit adds the `WebClient`, which relies on several parts of our
infrastructure:
* a `ClientHttpRequestFactory` to drive the underlying client library
* a `HttpRequestBuilder` builder API to create the client request
* a `WebResponseExtractor` to extract the "low-level"
`ClientHttpResponse` into a higher level representation such as a
decoded body

The `WebResponseExtractors` helper class contains many extractor
implementations all based on the `Flux`/`Mono` composition API.
2016-02-02 14:06:02 +01:00
Brian Clozel
f63960af0a Add client Request/Response impl. for RxNetty
This commit adds the `ClientHttpRequest` and `ClientHttpResponse`
implementations for the RxNetty HTTP client.
This client library is based on the `Single` and `Observable`
composition API, so this has to be converted to the `Flux`/`Mono`
variants.
2016-02-02 14:06:01 +01:00
Brian Clozel
255d2de553 Add client Request/Response impl. for Reactor-Net
This commit introduces the `ClientHttpRequest` and `ClientHttpResponse`
implementations for the Reactor-Net HTTP client. This client is already
based on the `Flux` and `Mono` contracts.

This commit also adds a `AbstractClientHttpRequest` to support the
`ClientHttpRequest` implementations; it mirrors the
`AbstractServerHttpResponse` contract with a `beforeCommit` to register
`Supplier`s that should be notified before the request is committed.
2016-02-02 14:06:01 +01:00
Brian Clozel
a6469baa4f Add HttpRequestBuilder default implementation
This commit adds a `DefaultHttpRequestBuilder` and its companion static
builders in `HttpRequestBuilders`. This allows to build client requests
with a friendly builder API, inspired by Spring's MockMvc API.
2016-02-02 14:06:01 +01:00
Brian Clozel
0983d302c7 Add base contracts for the Web client
This commit adds the base contracts for the Web client.
The "Reactive" prefixes of the previously commited contracts has been
removed to match the server ones.

Both the `ClientHttpRequest` and the `ServerHttpResponse` extend
`ReactiveHttpOutputMessage`, which now has a `beforeCommit` method,
necessary in both client and server implementations.

`HttpRequestBuilder` will be used by the developers to create requests
with a nice builder API. `ClientHttpRequestFactory` will provide support
for many HTTP client libraries in this new client.
2016-02-02 14:06:01 +01:00
Arjen Poutsma
a4be950e37 Polishing 2016-02-02 13:57:02 +01:00
Stephane Maldini
199252cda6 sync 2016-01-28 20:57:24 +00:00
Stephane Maldini
44f4930e29 sync 2016-01-28 20:36:29 +00:00