Plans for Java 8

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Plans for Java 8

Nestor Hernandez
Hi guys, As you Java 8 is a great leap forward in the language, I was wondering if there is some features planned for Stripes using Java 8 features like lambdas, method references, streams, etc.

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Plans for Java 8

Nestor Hernandez
For example when returning StreamingResolutions instead of 

 final Report report..;
        
        return new StreamingResolution("application/pdf") {

            @Override
            protected void stream(HttpServletResponse response) throws Exception {
                report.executePdf( response.getOutputStream());
            }
            
        }.setFilename("report.pdf");


It could be short, sweet and nice like this:

Report report..;
        
   return new StreamingResolution("application/pdf")
  .streaming(  response  -> report.executePdf( response.getOutputStream()) ) 
  .setFilename("report.pdf");

Or maybe passing directly an ServletOutputStream

Report report..;
        
   return new StreamingResolution("application/pdf")
  .streaming(  out -> report.executePdf(  out )  ) 
  .setFilename("report.pdf");




2015-01-23 7:44 GMT-05:00 Nestor Hernandez <[hidden email]>:
Hi guys, As you Java 8 is a great leap forward in the language, I was wondering if there is some features planned for Stripes using Java 8 features like lambdas, method references, streams, etc.


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users