Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One simply returns an Observable from the method and the runtime will make sure the response is finalized once the Observable flow is complete.

The only requirement is that one has to register a custom JAX-RS invoker, org.apache.cxf.jaxrs.rx.server.ObservableInvoker. It does all the default JAXRSInvoker does and only checks if Observable is returned - if yes then it links it internally with the JAX-RS AsyncResponse.

Combining with AsyncResponse

...