jsr370-experts@jax-rs-spec.java.net

Re: [jax-rs-spec users] NIO API Proposal in Java

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 13 Oct 2015 13:46:45 +0100

Hi Santiago

Yes, can they use inner classes instead (not sure if 'yes' implies JDK 7
can be used but I'm not after using JDK7...).
I see in your example a Request context has been modified so a new
Request method will be visible to a non-lambdas code (request.entity ?),
hence I'm curious.

https://github.com/spericas/api/blob/master/jaxrs-api/src/main/java/javax/ws/rs/core/Request.java#L181

Cheers, Sergey

On 13/10/15 13:34, Santiago Pericasgeertsen wrote:
> Hi Sergey,
>
> I’m not sure I follow. Is your question whether they can use inner classes instead of lambdas? Or if they can use a JDK without lambda support?
>
> — Santiago
>
>> On Oct 12, 2015, at 4:39 PM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:
>>
>> Hi Santiago, All
>>
>>> (2) NIO:
>>>
>>> https://github.com/spericas/api/blob/master/examples/src/main/java/jaxrs/examples/nio/FileResource.java
>>> https://github.com/spericas/api/blob/master/examples/src/main/java/jaxrs/examples/nio/FileResourceClient.java
>>>
>>> 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.
>>>
>>>
>> This may be a very silly question, but can we have a FileResource code also shown in Java ? Fine with the lamdas being used there - but can users keep working with the 'traditional' Java syntax in order to work with this NIO API ?
>>
>> Thanks, Sergey