Commit Graph

315 Commits

Author SHA1 Message Date
Rossen Stoyanchev
4af99473ff Add CompositeContenTypeResolver and a builder
This is the equivalent of the existing ContentNegotiationManager +
ContentNegotiationManagerFactoryBean
2016-04-18 17:43:20 -04:00
Rossen Stoyanchev
1f283acb98 Add path extension and parameter ContentTypeResolver's 2016-04-18 17:43:20 -04:00
Rossen Stoyanchev
9ffc0b5e65 Update FileExtensionContentTypeResolver
Rename to MappingContentTypeResolver and replace "fileExtension" with
"key" in methods to be more general (e.g. file extension or query
param). Also switch from List to Set for the return values.
2016-04-18 17:43:20 -04:00
Stephane Maldini
7d60c2767d Normalize returns with Scheduler factories in SchedulerGroup 2016-04-18 21:26:12 +01:00
Rossen Stoyanchev
0f44fedd19 Complete RequestMappingHandlerMapping
This commit adds RequestMappingInfoHandlerMapping and
RequestMappingHandlerMapping with support equivalent to that in
spring-webmvc.
2016-04-18 13:07:23 -04:00
Stephane Maldini
0e5a892bad Use ByteBuf instead of Buffer in reactor-netty 2016-04-18 17:49:32 +01:00
Stephane Maldini
ad9d8c28fe Polish reactor-ipc/netty contracts 2016-04-17 14:50:20 +01:00
Stephane Maldini
0a3396c5b2 Polish contracts 2016-04-16 01:05:30 +01:00
Stephane Maldini
9a4b98d2e9 Update HttpClient with Inbound/Outbound contract split 2016-04-15 23:23:54 +01:00
Stephane Maldini
4431a76a05 Update addCookie signature and improve client cookie 2016-04-15 21:25:56 +01:00
Rossen Stoyanchev
b2ca216498 Add RequestCondition hierarchy
A pretty complete equivalent to the same in spring-webmvc except for
CORS checks, and custom HTTP methods. Another notable difference is
that the "params" condition works on query params strictly.
2016-04-15 16:21:46 -04:00
Rossen Stoyanchev
641c6428e8 Add ContentTypeResolver strategy
A starting point for an alternative to the existing
ContentNegotiationStrategy but for use with ServerWebExchange.
2016-04-15 16:21:46 -04:00
Rossen Stoyanchev
09c5711862 Polish ServerHttpRequest
Consistent initialization of HttpHeaders and the cookies map.
 - allow sub-classes to create instance
 - make unmodifiable
2016-04-15 16:21:46 -04:00
Rossen Stoyanchev
a7f32cd528 Add getQueryParams to ServerHttpRequest 2016-04-15 16:21:46 -04:00
Rossen Stoyanchev
61136e614e Fix issue with Cookies in ReactorServerHttpResponse 2016-04-15 16:20:55 -04:00
Stephane Maldini
4ddd9d2895 fix change issue on HttpChannel#writeHeaders to sendHeaders 2016-04-15 20:04:52 +01:00
Stephane Maldini
4a0adc2b2d Sync with reactor-netty and reactor-ipc 2016-04-15 19:55:33 +01:00
Rossen Stoyanchev
33a7b91e57 Add abstract case class HandlerMappings
This commit adds AbstractHandlerMethodMapping, a starting point for
AbstractHandlerMapping, and HttpRequestPathHelper with a similar
purpose to UrlPathHelper but based with ServerWebExchange as input.
2016-04-15 04:08:19 -04:00
Rossen Stoyanchev
341f23e0e6 Add "result" package under ~.web.reactive
The new package is parallel to the "mvc" package under spring-webmvc
and a place to hold the various programming model styles.
2016-04-14 16:15:44 -04:00
Rossen Stoyanchev
3460e577ad Polish "simple" handler support
- correct name of HttpHandlerHandlerAdapter to WebHandlerHandlerAdapter
- shorten SimpleHandlerResultHandler to SimpleResultHandler
- add HandlerResult constructor without Model
- update tests
2016-04-14 15:17:28 -04:00
Stephane Maldini
ff6b639cf9 sync with dispatchOn change in reactor-core 2016-04-11 16:04:01 +01:00
Brian Clozel
a3b371bf4b Accept all media types in StringDecodere
This commit adds the "*/*" media type in the list of compatible media
types for the StringDecoder. This allows this decoder to decoder
payloads of any media type as long as the target type is String.

Fixes #87
2016-04-08 22:18:46 +02:00
Stephane Maldini
da2276a954 First wave scheduler contract migration 2016-04-08 03:09:32 +01:00
Sebastien Deleuze
87ce5d641c Update dependencies
- Spring Framework 4.2.3.RELEASE -> 4.3.0.RC1
 - Netty 4.1.0.CR3 -> 4.1.0.CR6
 - Jackson 2.6.2 -> 2.7.3
 - Jetty 9.3.5.v20151012 -> 9.3.8.v20160314
 - Undertow 1.3.5.Final -> 1.3.20.Final
2016-04-07 20:26:38 +02:00
Brian Clozel
023dafa903 Support "text/*" media types in StringDecoder 2016-04-07 16:06:56 +02:00
Brian Clozel
e3f87b3e3a Polish 2016-04-07 16:06:56 +02:00
Brian Clozel
09327181c4 Improve ClientHttpRequestFactory javadoc
This commit underlines the fact that the request created by a
ClientHttpRequestFactory should be augmented with a message body using
the `ClientHttpRequest#setBody` method before it is executed.

See #82
2016-04-07 16:06:56 +02:00
Brian Clozel
ddf996cfeb Polish HttpRequestBuilder API
This commit makes messageEncoders a required argument for building a
client request - those are needed to actually encode the body object as
a reactive stream to be written to the HTTP request body.

Removed raw types usage in DefaultHttpRequestBuilder.

DefaultHttpRequestBuilder now uses a UriTemplateHandler to expand URI
templates + variables into a concrete URI.

Fixes #80, fixes #85, fixes #86
2016-04-07 16:06:56 +02:00
Brian Clozel
8ed2925ce3 Propagate Errors in DefaultHttpRequestBuilder
This commit introduces the new `WebClientException` for wrapping
client-side exceptions.
This exception is now thrown when now message encoder can be found for
writing the request body as an HTTP request message.

Fixes #83
2016-04-07 16:06:56 +02:00
Brian Clozel
e2a07659ab Add generics support for WebResponseExtractors
This commit adds generics support for WebResponseExtractors.
Types should be described using a ResolvableType, which can be
created with static methods like:

    // for the type Event<Registration>
    ResolvableType.forClassWithGenerics(Event.class, Registration.class)

Fixes #89
2016-04-07 16:06:56 +02:00
Sebastien Deleuze
24a63f1d90 Upgrade RxNetty to 0.5.2-SNAPSHOT and Tomcat to 8.0.33 2016-04-07 16:04:39 +02:00
Brian Clozel
04fae44163 Switch back to reactor-core SNAPSHOT versions
Some important issues have been fixed in recent SNAPSHOT versions.

See #78 and #70
2016-04-07 15:10:49 +02:00
Arjen Poutsma
5f09a62950 Merge pull request #77 from poutsma/refactor_jaxb2decoder
Improve Jaxb2Decoder
2016-04-06 16:25:36 +02:00
Arjen Poutsma
75399814cd Improve Jaxb2Decoder
- Introcuces XmlEventDecoder which decodes from DataBuffer to
  javax.xml.stream.events.XMLEvent. It uses the Aalto async XML API if
  available, but falls back to a blocking default if not.

- Refacors Jaxb2Decoder to use said XmlEventDecoder, and split the
  stream of events into separate substreams by using the JAXB annotation
  value, one stream for each part of the tree that can be unmarshaled to
  the given type.

- Various improvements in the JAXB code.
2016-04-06 16:22:49 +02:00
Arjen Poutsma
a8f27af5fb Polishing. 2016-04-06 16:20:08 +02:00
Brian Clozel
ef58fdcd7b Merge pull request #88 from rwinch/gh-81-requestpostprocessor
Add RequestPostProcessor
2016-04-04 11:28:43 +02:00
Rob Winch
fd6fc30eea Add RequestPostProcessor
Fixes gh-81
2016-03-31 12:33:45 -05:00
Arjen Poutsma
75d006d2f9 Improve StringDecoder. 2016-03-31 11:31:02 +02:00
Arjen Poutsma
d927d72204 Merge pull request #76 from lukas-krecan/trivial-test-fix
Replacing potentionally slow and infinite while loop by a latch
2016-03-29 10:36:22 +02:00
Lukas Krecan
23f3fff367 Replacing potentionally slow and infinite while loop by a latch 2016-03-29 10:33:21 +02:00
Arjen Poutsma
d9d76ecd19 Polishing 2016-03-24 09:39:58 +01:00
Arjen Poutsma
10af007110 Merge pull request #74 from poutsma/refactor_servlet31_undertow
Refactoring of Servlet 3.1 and Undertow support
2016-03-23 17:10:07 +01:00
Arjen Poutsma
35e511b03f Resolved comments from review
This commit resolves a few comments brought forward during a review
meeting, specifically:

- It renames AbstractResponseBodyPublisher to
  AbstractRequestBodyPublisher.
- It separates out registration logic into a register method.
- It moves the RequestBodyPublisher and ResponseBodySubscriber for the
  Servlet 3.1 support back into ServletHttpHandlerAdapter.
2016-03-23 17:04:18 +01:00
Arjen Poutsma
d20b0003c6 Refactoring of Servlet 3.1 and Undertow support
- Introduce abstract base class for Servlet 3.1 and Undertow support
- Simplify Undertow support
2016-03-23 16:02:44 +01:00
Arjen Poutsma
f7c6c69e51 Improve JacksonJsonEncoder
This commit removes the need for the custom Subscriber in
JsonObjectEncoder, and replaces it with higher-level Flux and Mono-based
solution.
2016-03-21 11:37:51 +01:00
Arjen Poutsma
7f786ce4d7 Added DataBufferAllocator property to ReactiveHttpOutputMessage, and use that to pass on to Encoder.encode(). 2016-03-18 16:14:33 +01:00
Arjen Poutsma
1836b2825b Added DataBufferAllocator parameter to Encoder.encode, and use that instead of AbstractAllocatingEncoder base class. 2016-03-18 16:05:30 +01:00
Arjen Poutsma
e56dda1864 Make JsonObjectDecoder use allocator property on DataBuffer. 2016-03-18 14:11:25 +01:00
Arjen Poutsma
b838fdab88 Added allocator property to DataBuffer 2016-03-18 12:16:23 +01:00
Arjen Poutsma
273c1b85e6 Reduced batch size to 1, so that we don't block on init. 2016-03-18 11:58:55 +01:00