1. 08 7月, 2016 1 次提交
    • R
      Support HttpEntity method arguments · 1e1e2f8b
      Rossen Stoyanchev 提交于
      The RequestBodyArgumentResolver has been refactored to have a shared
      base class and tests with the new HttpEntityMethodArgumentResolver.
      
      An HttpEntity argument is not expected to have an async wrapper because
      the request headers are available immediately. The body however can be
      asynchronous, e.g. HttpEntity<Flux<String>>.
      1e1e2f8b
  2. 04 7月, 2016 2 次提交
    • R
      Provide rich type information to ConversionService · 8c765814
      Rossen Stoyanchev 提交于
      When using the ConversionService to check and bridge to and from
      reactive types we now generallly provide the full type information
      available from method signatures. However that full type information
      is not always necessary such as when we perform additional checks on
      the generics of the reactive type (e.g. Mono<ResponseEntity>).
      
      This allows us to switch to use DefaultFormattingConversionService
      instead of GenericConversionService while also ensuring that the
      CollectionToObjectConverter doesn't think it can convert List<?> to
      any reactive type.
      
      The ObjectToObjectConverter can also interfere because it is smart
      enough to find the "from(Publisher<?>)" method on Flux and Mono.
      To make up for that on the response side we now check if a type
      is assignable to Publisher first in which case it is a simple cast.
      
      In turn that means we don't need a PublisherToFluxConverter which can
      be problematic in its own right because it can convert from Mono to
      Flux which technically doesn't lose data but switches stream semantics.
      
      Issue: #124, #128
      8c765814
    • R
      HandlerResult now requires MethodParameter as input · fb2e7960
      Rossen Stoyanchev 提交于
      HandlerAdapter's should always be able to provide a MethodParameter
      which in turn ensures that HandlerResultHandler's have full type
      information from method declarations.
      
      This commit also introduces ResolvableMethod for use in tests to make
      it easy to obtain MethodParameter return types.
      
      Issue: #128
      fb2e7960
  3. 02 7月, 2016 1 次提交
    • S
      Refactor reactive type conversion support · 12d7b781
      Sebastien Deleuze 提交于
      This commit replaces Reactive Streams converters for RxJava1 and
      CompletableFuture with Reactor specific ones. The results in conversion
      that preserves stream semantics, i.e. Mono vs Flux.
      
      For example this is allowed:
      Flux -> Observable
      Mono -> Single
      Mono -> CompletableFuture
      
      This is not allowed:
      Flux -> Single
      Mono -> Observable
      Flux -> CompletableFuture
      
      As a result it is now possible to check through the ConversionService
      if a target type to convert to is a stream of many or of one which is
      useful for decoding purposes.
      
      The commit also adds PublisherToFluxConverter to allow conversion from
      raw Publisher to Flux. The reverse is not necessary since Flux is a
      Publisher and it's a no-op conversion.
      12d7b781
  4. 01 7月, 2016 2 次提交
  5. 30 6月, 2016 1 次提交
  6. 27 6月, 2016 1 次提交
    • R
      ResponseBodyResultHandler ignores ResponseEntity · 699b0571
      Rossen Stoyanchev 提交于
      Currently ResponseEntityResultHandler is ordered lower than
      ResponseBodyResultHandler by default whch means a ResponseEntity
      should not be picked by the ResponseBodyResultHandler.
      
      However as it is easy to have both ResponseEntity and @ResponseBody
      e.g. in @RestControler (or even by mistake) and in general it makes
      sense for ResponseBodyResultHandler to explicitly recognize and
      ignore the ResponseEntity return type.
      699b0571
  7. 25 6月, 2016 1 次提交
    • R
      Refactor @ResponseBody and ResponseEntity tests · cae88001
      Rossen Stoyanchev 提交于
      Introduce separate test classes for each base class in the hierarchy
      above @ResponseBody and ResponseEntity result handlers.
      
      Also start porting existing unit test cases for @ResponseBody and
      ResponseEntity return value handlers.
      cae88001
  8. 22 6月, 2016 1 次提交
  9. 06 6月, 2016 1 次提交
  10. 27 5月, 2016 1 次提交
  11. 26 5月, 2016 3 次提交
  12. 20 4月, 2016 1 次提交
    • A
      Wrapping up zero-copy support · 804f69c8
      Arjen Poutsma 提交于
      This commit wraps up the previous commits:
      
       - It uses HttpMessageConverter in the web.reactive.server package instead of Encoder/Decoder.
       - It introduces tests for the Resource @ResponseBodies.
      804f69c8
  13. 15 4月, 2016 1 次提交
  14. 18 3月, 2016 1 次提交
  15. 09 2月, 2016 1 次提交
  16. 27 1月, 2016 1 次提交
  17. 23 11月, 2015 1 次提交
    • R
      Remove top-level org.springfamework.reactive package · 4a3c0bc3
      Rossen Stoyanchev 提交于
      reactive.codec -> core.codec
      reactive.io    -> util
      
      These may very well not be the final locations. For now they simply
      express that there are classes that belong somewhere in core, i.e.
      they are lower level dependencies than web.
      4a3c0bc3
  18. 14 11月, 2015 2 次提交
    • R
      Refactor package structure for web · 81867fa4
      Rossen Stoyanchev 提交于
      The web related code is now under org.springframework.web.reactive.
      This is parallel to org.springframework.web (the top-level package of
      spring-webmvc).
      81867fa4
    • S
      Add a ResolvableType field to HandlerResult · c6713c23
      Sebastien Deleuze 提交于
      This change allows to be able to check generic type on the return value
      at HandlerAdapter and ResultHandler level. For example, it allows to do
      a Publisher<Void> check in SimpleHandlerResultHandler.
      c6713c23
  19. 31 10月, 2015 2 次提交
  20. 29 10月, 2015 1 次提交
    • S
      Add handler method parameter and result converters · adc50bbf
      Sebastien Deleuze 提交于
      This commit introduces the following changes:
       - Publisher -> Observable/Stream/etc. conversion is now managed
          in a dedicated ConversionService instead of directly in
          RequestBodyArgumentResolver and ResponseBodyResultHandler
       - More isolated logic that decides if the stream should be
          serialized as a JSON array or not
       - Publisher<ByteBuffer> are now handled by regular
         ByteBufferEncoder and ByteBufferDecoder
       - Handle Publisher<Void> return value properly
       - Ensure that the headers are properly written even for response
         without body
       - Improve JsonObjectEncoder to autodetect JSON arrays
      adc50bbf
  21. 03 10月, 2015 1 次提交