[jax-rs-spec users] NIO reader/writer interface and contract?

From: Bill Burke <>
Date: Tue, 13 Oct 2015 12:40:47 -0400

On 10/12/2015 10:30 AM, Santiago Pericasgeertsen wrote:
> (2) NIO:
> On the server side, the proposal follows the pattern set by
> StreamingOutput, but of course using lambdas this time around. As you
> know, Servlet already supports NIO, but with a completely different API.

I don't think lambdas should be the only approach to NIO. Developers
are gonna want to encapsulate NIO parsing logic into reusable components
like MessageBodyReaders/Writers, right? These NIO readers/writers would
either be consumed internally by the CLient or Server JAX-RS
implementation, or passed off to the developers own event loop logic.
Wouldn't thesee NIO reader/writers need to hold state as they are called
by the event loop when io is ready? Wouldn't that mean they need to
support injection?

Bill Burke
JBoss, a division of Red Hat