SlideShare a Scribd company logo
1 of 54
Download to read offline
1   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS 2.0: What’s New in JSR 339 ?
Arun Gupta, Java EE & GlassFish Guy
http://blogs.oracle.com/arungupta, @arungupta
 2   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Tokyo 2012
                                                                           De 4 à 6 de Abril de 2012

                                                                           San Francisco 2012
                                                                           De 30 de Setembro à 4 de Outubro de 2012




3   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
The following is intended to outline our general product direction. It is
                    intended for information purposes only, and may not be incorporated into
                    any contract. It is not a commitment to deliver any material, code, or
                    functionality, and should not be relied upon in making purchasing
                    decisions. The development, release, and timing of any features or
                    functionality described for Oracle s products remains at the sole discretion
                    of Oracle.




4   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Part I: How we got here ?




5   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
How We Got Here?

    •  Shortest intro to JAX-RS 1.0
    •  Requested features for JAX-RS 2.0
    •  JSR 339: JAX-RS 2.0




6   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS Origins

    •  JAX-RS 1.0 is Java API for RESTful WS
    •  RESTFul Principles:
       –  Assign everything an ID
       –  Link things together
       –  Use common set of methods
       –  Allow multiple representations
       –  Stateless communications



7   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JAX-RS 1.0 Goals

    •  POJO-Based API
    •  HTTP Centric
    •  Format Independence
    •  Container Independence
    •  Inclusion in Java EE




8   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: JAX-RS API
                                                                                     Resources


@Path("/atm/{cardId}")	                                    URI Parameter
public class AtmService {	                                   Injection
	
    @GET @Path("/balance")	
    @Produces("text/plain")	
    public String balance(@PathParam("cardId") String card,	
                           @QueryParam("pin") String pin) {	
        return Double.toString(getBalance(card, pin));	
    }	
	
    …	
	
 HTTP Method                                                                  Built-in
   Binding                                                                  Serialization



 9   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: JAX-RS API (contd.)
                 …	                                                         Custom Serialization
 	
             @POST @Path("/withdrawal")	
             @Consumes("text/plain") 	
             @Produces("application/json")	
             public Money withdraw(@PathParam("card") String card,	
                                   @QueryParam("pin") String pin, 	
                                   String amount){	
                 return getMoney(card, pin, amount);	
             }	
 }	




10   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Requested Features

                                                                            Filters/Handlers
                                        Client API

                                                                                               Hypermedia
                             Async                                          JSR 330

                                                                                                Validation
                                     Improved
                                      Conneg                                    MVC

11   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
JSR 339 Expert Group

     •  EG Formed in March 2011
     •  Oracle Leads: Marek Potociar / Santiago Pericas-G.
     •  Expert Group:
         –  Jan Algermissen, Florent Benoit, Sergey Beryozkin (Talend),
            Adam Bien, Bill Burke (RedHat), Clinton Combs, Bill De Hora,
            Markus Karg, Sastry Malladi (Ebay), Julian Reschke, Guilherme
            Silveira, Dionysios Synodinos
     •  Early Draft published on Nov 1, 2011!


12   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Part II: Where We Are Going




13   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
New in JAX-RS 2.0
                                                                                              ✔
                                                                            ✔   Filters/Handlers
                                        Client API
                                                                                                                 ✔
                                                                                                   Hypermedia
                                                                      ✔                   ✔
                             Async                                              JSR 330
                                                                                                                 ✔
                                                                                                    Validation
                                     Improved
                                                                            ✔
                                                                                              ✗
                                      Conneg                                        MVC

14   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
New in JAX-RS 2.0

                                                                            Filters/Handlers
                                        Client API

                                                                                               Hypermedia
                             Async                                          JSR 330

                                                                                                Validation
                                     Improved
                                      Conneg

15   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Motivation

     •  HTTP client libraries too low level
     •  Sharing features with JAX-RS server API
        •  E.g., MBRs and MBWs

     •  Supported by some JAX-RS 1.0 implementations
        •  Need for a standard




16   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Client API

                                                                                                  Resource Target
Client Factory                                                      Client
                                                                                                  “atm”



                                                                    Configuration                 Resource Target
                                                                   Configuration
                                                                  Configuration                   “{cardId}”


                                                                                      Resource Target           Resource Target
Invocation                                                          Request Builder
                                                                                      “balance”                 “withdrawal”



                              Response

  17   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Client API

// Get instance of Client	
Client client = ClientFactory.newClient();	
	
Can also inject @URI for the target ß	
	
// Get account balance	
String bal = client.target("http://.../atm/balance")	
    .pathParam("card", "111122223333")	
    .queryParam("pin", "9876") 	
    .request("text/plain").get(String.class);	
	

18   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Client API (contd.)

// Withdraw some money	
Money mon = client.target("http://.../atm/withdraw")	
    .pathParam("card", "111122223333")	
    .queryParam("pin", "9876")	
    .request("application/json")	
    .post(text("50.0"), Money.class);	




19   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Generic Interface (Command pattern,
     Batch processing)
Invocation inv1 = 	
    client.target("http://.../atm/balance")…	
    .request(“text/plain”).buildGet();	
	
Invocation inv2 = 	
    client.target("http://.../atm/withdraw")…	
    .request("application/json")	
    .buildPost(text("50.0"));	
	



20   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Generic Interface (contd.)
	
Collection<Invocation> invs = 	
  Arrays.asList(inv1, inv2);	
	
Collection<Response> ress = 	
  Collections.transform(invs, 	
    new F<Invocation, Response>() {	
      public Response apply(Invocation inv) {	
         return inv.invoke(); 	
      }	
    });	


21   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Configuration
// Get client and register MyProvider1	
Client client = ClientFactory.newClient();	
client.configuration().register(MyProvider1.class);	
	
// Create atm and register MyProvider2	
// Inherits MyProvider1 from client	
Target atm = client.target("http://.../atm");	
atm.configuration().register(MyProvider2.class);	
	
// Create balance and register MyProvider3	
// Inherits MyProvider1, MyProvider2 from atm	
Target balance = atm.path("balance");    // new instance	
balance.configuration().register(MyProvider3.class);	
	
	
22   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
New in JAX-RS 2.0

                                                                            Filters/Handlers
                                        Client API

                                                                                               Hypermedia
                             Async                                          JSR 330

                                                                                                Validation
                                     Improved
                                      Conneg

23   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Motivation

     •  Customize JAX-RS implementations via well-defined
        extension points
     •  Use Cases: Logging, Compression, Security, Etc.
     •  Shared by client and server APIs
     •  Supported by most JAX-RS 1.0 implementations
           •  All using slightly different types or semantics




24   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Filters

     •  Non-wrapping extension points
        •  Pre: Interface RequestFilter	
        •  Post: Interface ResponseFilter	

     •  Part of a filter chain
     •  Do not call the next filter directly
     •  Each filter decides to proceed or break chain
        •  By returning FilterAction.NEXT or FilterAction.STOP	



25   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Filter Example: LoggingFilter
@Provider	
class LoggingFilter 	
    implements RequestFilter, ResponseFilter {	
	
    @Override	
    public FilterAction preFilter(FilterContext ctx) 	
       throws IOException {	
         logRequest(ctx.getRequest());	
         return FilterAction.NEXT;	
    }	
	
    …	
	
    26   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Filter Example: LoggingFilter (contd.)

	
          @Override	
           public FilterAction postFilter(FilterContext ctx) 	
             throws IOException {	
               logResponse(ctx.getResponse());	
               return FilterAction.NEXT;	
           } 	
	
    }	



     27   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Handlers

     •  Wrapping extension points
        •  ReadFrom: Interface ReadFromHandler	
        •  WriteTo: Interface WriteToHandler	

     •  Part of a handler chain
     •  Call the next handler directly
     •  Each handler decides to proceed or break chain
        •  By calling ctx.proceed()	



28   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Handler Example: GzipHandler
@Provider	
class GzipHandler implements ReadFromHandler, WriteToHandler
{	
	
     @Override	
     public Object readFrom(ReadFromHandlerContext ctx) 	
         throws IOException {	
         if (gzipEncoded(ctx)) {	
             InputStream old = ctx.getInputStream();	
             ctx.setInputStream(new GZIPInputStream(old));	
         }	
         return ctx.proceed();	
     } 	
… }	
	 29   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Binding

     •  Associating filters and handlers with resource methods
     •  Same mechanism for filters and handlers

                                                                            Name Binding     Global Binding


                                                                            @NameBinding/
                                     Static                                                    DEFAULT
                                                                             @Qualifier?

                                                                            DynamicBinding   DynamicBinding
                                Dynamic
                                                                               interface        Interface


30   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Binding Example: LoggingFilter
     @NameBinding 	 	// or @Qualifier ?	
     @Target({ElementType.TYPE, ElementType.METHOD})	
     @Retention(value = RetentionPolicy.RUNTIME)	
     public @interface Logged {	
     }	
     	
     @Provider	
     @Logged	
     @BindingPriority(USER)	
     public class LoggingFilter implements RequestFilter, 	
         ResponseFilter 	
     { … }	
     	

31   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Binding Example: LoggingFilter
     @Path("/")	
     public class MyResourceClass {	
     	
         @Logged	
         @GET	
         @Produces("text/plain")	
         @Path("{name}")	
         public String hello(@PathParam("name") String name) {	
             return "Hello " + name;	
         }	
     }	
     	


32   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
New in JAX-RS 2.0

                                                                            Filters/Handlers
                                        Client API

                                                                                               Hypermedia
                             Async                                          JSR 330

                                                                                                Validation
                                     Improved
                                      Conneg

33   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Motivation

     •  Services must validate data
     •  Bean Validation already provides the mechanism
        •  Integration into JAX-RS

     •  Support for constraint annotations in:
        •  Fields and properties
        •  Parameters (including request entity)
        •  Methods (response entities)
        •  Resource classes


34   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Constraint Annotations
   @Path("/")	
   class MyResourceClass {	
   	
         @POST	
         @Consumes(MediaType.APPLICATION_FORM_URLENCODED)	
Built-in public void registerUser(	
               @NotNull @FormParam("firstName") String fn,	
Custom
               @NotNull @FormParam("lastName") String ln,	
               @Email @FormParam("email") String em) {	
               ... } 	
   }	
      	


 35   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: User defined Constraints
     @Target({ METHOD, FIELD, PARAMETER })	
     @Retention(RUNTIME)	
     @Constraint(validatedBy = EmailValidator.class)	
     public @interface Email { ... }	
     	
     class EmailValidator 	
       implements ConstraintValidator<Email, String> {	
         public void initialize(Email email) {	
             … }	
         public boolean isValid(String value,     	
             ConstraintValidatorContext context) {	
             // Check 'value' is e-mail address 	
             … } }	

36   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Request Entity Validation
@CheckUser1	
class User { ... }	
	
@Path("/")	
class MyResourceClass {	
    @POST	
    @Consumes("application/xml")	
    public void registerUser1(@Valid User u) { … } 	
	
    @POST	
    @Consumes("application/json")	
    public void registerUser12(@CheckUser2 @Valid User u)
{ … } 	
}	
 37   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
New in JAX-RS 2.0

                                                                            Filters/Handlers
                                        Client API

                                                                                               Hypermedia
                             Async                                          JSR 330

                                                                                                Validation
                                     Improved
                                      Conneg

38   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Motivation

     •  Let “borrowed” threads run free!
        •  Container environment

     •  Suspend and resume connections
        •  Suspend while waiting for an event
        •  Resume when event arrives

     •  Leverage Servlet 3.X async support (if available)
     •  Client API support
        •  Future<RESPONSE>, InvocationCallback<RESPONSE>


39   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Suspend and Resume
 @Path("/async/longRunning")	
 public class MyResource {    	
   @Context private ExecutionContext ctx;	
 	
   @GET @Produces("text/plain")	
   public void longRunningOp() {	
     Executors.newSingleThreadExecutor().submit(	
       new Runnable() {	
           public void run() { 	
               Thread.sleep(10000);     // Sleep 10 secs	
               ctx.resume("Hello async world!"); 	
           } });	
     ctx.suspend(); 	 	// Suspend connection and return	
   } … }   	
40   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: @Suspend Annotation
     @Path("/async/longRunning")	
     public class MyResource {    	
       @Context private ExecutionContext ctx;	
     	
       @GET @Produces("text/plain") @Suspend	
       public void longRunning() {	
         Executors.newSingleThreadExecutor().submit(	
           new Runnable() {	
               public void run() { 	
                   Thread.sleep(10000);     // Sleep 10 secs	
                   ctx.resume("Hello async world!"); 	
               } });	
         // ctx.suspend(); Suspend connection and return	
       } … }   	
41   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Client API Async Support
 // Build target URI	
 Target target = client.target("http://.../atm/balance")…	
     	
 // Start async call and register callback	
 Future<?> handle = target.request().async().get(	
     new InvocationCallback<String>() {	
         public void complete(String balance) { … }	
         public void failed(InvocationException e) { … }	
       });	
   	
 // After waiting for a while …	
 If (!handle.isDone()) handle.cancel(true);	
 	

42   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
New in JAX-RS 2.0

                                                                            Filters/Handlers
                                        Client API

                                                                                               Hypermedia
                             Async                                          JSR 330

                                                                                                Validation
                                     Improved
                                      Conneg

43   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Motivation

     •  REST principles
        •  Identifiers and Links
        •  HATEOAS (Hypermedia As The Engine Of App State)

     •  Link types:
        •  Structural Links
        •  Transitional Links




44   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Structural vs. Transitional Links
     Link: <http://.../orders/1/ship>; rel=ship,	
            <http://.../orders/1/cancel>; rel=cancel	   Transitional
     ...	
     <order id="1">	
       <customer>http://.../customers/11</customer>	
       <address>http://.../customers/11/address/1</customer>	
       <items>	
          <item>	                                         Structural

            <product>http://.../products/111</products>	
            <quantity>2</quantity>	
       </item>	
       ... </order>    	


45   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Current Proposal
     Transitional Links Only
     •  Link and LinkBuilder classes
        •  RFC 5988: Web Linking

     •  Support for Link in ResponseBuilder	
     •  Create Target from Link in Client API




46   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Example: Using Transitional Links
// Server API	
Response res = Response.ok(order)	
      .link("http://.../orders/1/ship", "ship")	
      .build();	
      	
// Client API	
Response order = client.target(…)	
      .request("application/xml").get();	
	
if (order.getLink(“ship”) != null) {          	
      Response shippedOrder = client	
          .target(order.getLink("ship"))	
          .request("application/xml").post(null);	
    … }	
  	
 47   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
New in JAX-RS 2.0

                                                                            Filters/Handlers
                                        Client API

                                                                                               Hypermedia
                             Async                                          JSR 330

                                                                                                Validation
                                     Improved
                                      Conneg

48   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Improved Conneg

        GET http://.../widgets2	
        Accept: text/*; q=1	
        …	
        	
        Path("widgets2")	
        public class WidgetsResource2 {	
           @GET	
           @Produces("text/plain", 	
                     "text/html")	
           public Widgets getWidget() {...}	
        }	

49   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Improved Conneg (contd.)

        GET http://.../widgets2	
        Accept: text/*; q=1	
        …	
        	
        Path("widgets2")	
        public class WidgetsResource2 {	
           @GET	
           @Produces("text/plain;qs=0.5",	
                     "text/html;qs=0.75")	
           public Widgets getWidget() {...}	
        }	

50   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Other Topics Under Consideration

     •  Better integration with JSR 330
        •  Support @Inject and qualifiers

     •  High-level client API?




51   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
More Information

     •  JSR: http://jcp.org/en/jsr/detail?id=339
     •  Java.net: http://java.net/projects/jax-rs-spec
     •  User Alias: users@jax-rs-spec.java.net
        •  All EG discussions forwarded to this list




52   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Q&A


53   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
54   Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

More Related Content

What's hot

Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgArun Gupta
 
JAX-RS 2.0: RESTful Web services on steroids
JAX-RS 2.0: RESTful Web services on steroidsJAX-RS 2.0: RESTful Web services on steroids
JAX-RS 2.0: RESTful Web services on steroidscodemotion_es
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Arun Gupta
 
GIDS 2012: JAX-RS 2.0: RESTful Java on Steroids
GIDS 2012: JAX-RS 2.0: RESTful Java on SteroidsGIDS 2012: JAX-RS 2.0: RESTful Java on Steroids
GIDS 2012: JAX-RS 2.0: RESTful Java on SteroidsArun Gupta
 
Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0Arun Gupta
 
JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013Jagadish Prasath
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGArun Gupta
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012Arun Gupta
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Reza Rahman
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration BackendArun Gupta
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
Utilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityUtilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityMasoud Kalali
 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012Arun Gupta
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudArun Gupta
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Arun Gupta
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5Arun Gupta
 

What's hot (19)

Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
JAX-RS 2.0: RESTful Web services on steroids
JAX-RS 2.0: RESTful Web services on steroidsJAX-RS 2.0: RESTful Web services on steroids
JAX-RS 2.0: RESTful Web services on steroids
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
 
RESTing with JAX-RS
RESTing with JAX-RSRESTing with JAX-RS
RESTing with JAX-RS
 
GIDS 2012: JAX-RS 2.0: RESTful Java on Steroids
GIDS 2012: JAX-RS 2.0: RESTful Java on SteroidsGIDS 2012: JAX-RS 2.0: RESTful Java on Steroids
GIDS 2012: JAX-RS 2.0: RESTful Java on Steroids
 
Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0
 
JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
 
Java EE 7 - Overview and Status
Java EE 7  - Overview and StatusJava EE 7  - Overview and Status
Java EE 7 - Overview and Status
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
Java EE7
Java EE7Java EE7
Java EE7
 
Utilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityUtilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE Security
 
Java EE 7 overview
Java EE 7 overviewJava EE 7 overview
Java EE 7 overview
 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5
 

Viewers also liked

Regla del Boy Scout y la Oxidación del Software
Regla del Boy Scout y la Oxidación del SoftwareRegla del Boy Scout y la Oxidación del Software
Regla del Boy Scout y la Oxidación del SoftwareAlejandro Pérez García
 
JAX-RS 2.0: RESTful Java on Steroids, by Aron Gupta
JAX-RS 2.0: RESTful Java on Steroids, by Aron GuptaJAX-RS 2.0: RESTful Java on Steroids, by Aron Gupta
JAX-RS 2.0: RESTful Java on Steroids, by Aron GuptaCodemotion
 
JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and ODataAnil Allewar
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsSagara Gunathunga
 
Collare Kart E
Collare Kart ECollare Kart E
Collare Kart Edierubio
 
Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...
Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...
Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...chrislinder
 
E2 Home - P Ljunggren
E2 Home - P LjunggrenE2 Home - P Ljunggren
E2 Home - P Ljunggrenmfrancis
 
Dependencia tecnológica: ¿estamos vendidos?
Dependencia tecnológica: ¿estamos vendidos?Dependencia tecnológica: ¿estamos vendidos?
Dependencia tecnológica: ¿estamos vendidos?dromerotrejo
 
Dossier comercial liber 2013
Dossier comercial liber 2013Dossier comercial liber 2013
Dossier comercial liber 2013bmpsa
 
Joseph halow innocent in dachau-the trial and punishment of franz kofler e...
Joseph halow    innocent in dachau-the trial and punishment of franz kofler e...Joseph halow    innocent in dachau-the trial and punishment of franz kofler e...
Joseph halow innocent in dachau-the trial and punishment of franz kofler e...RareBooksnRecords
 
Nuovo passeggino Trio Living Smart
Nuovo passeggino Trio Living SmartNuovo passeggino Trio Living Smart
Nuovo passeggino Trio Living SmartVincenzo Scarano
 
Directorio De Proyectos En Pdf
Directorio De Proyectos En PdfDirectorio De Proyectos En Pdf
Directorio De Proyectos En Pdfguestc78d8268
 
What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...
What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...
What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...nexxtep
 
Mini guía ciudad de barcelona
Mini guía ciudad de barcelonaMini guía ciudad de barcelona
Mini guía ciudad de barcelonamadriderasmus.es
 

Viewers also liked (20)

Regla del Boy Scout y la Oxidación del Software
Regla del Boy Scout y la Oxidación del SoftwareRegla del Boy Scout y la Oxidación del Software
Regla del Boy Scout y la Oxidación del Software
 
JAX-RS 2.0: RESTful Java on Steroids, by Aron Gupta
JAX-RS 2.0: RESTful Java on Steroids, by Aron GuptaJAX-RS 2.0: RESTful Java on Steroids, by Aron Gupta
JAX-RS 2.0: RESTful Java on Steroids, by Aron Gupta
 
JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and OData
 
Gradle vs Maven
Gradle vs MavenGradle vs Maven
Gradle vs Maven
 
Gradle como alternativa a maven
Gradle como alternativa a mavenGradle como alternativa a maven
Gradle como alternativa a maven
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rs
 
Maven
MavenMaven
Maven
 
Maven
Maven Maven
Maven
 
Collare Kart E
Collare Kart ECollare Kart E
Collare Kart E
 
Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...
Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...
Recentering Minoritized Voices: Social Media & Intersectional Sexual Violence...
 
E2 Home - P Ljunggren
E2 Home - P LjunggrenE2 Home - P Ljunggren
E2 Home - P Ljunggren
 
Dependencia tecnológica: ¿estamos vendidos?
Dependencia tecnológica: ¿estamos vendidos?Dependencia tecnológica: ¿estamos vendidos?
Dependencia tecnológica: ¿estamos vendidos?
 
Dossier comercial liber 2013
Dossier comercial liber 2013Dossier comercial liber 2013
Dossier comercial liber 2013
 
Joseph halow innocent in dachau-the trial and punishment of franz kofler e...
Joseph halow    innocent in dachau-the trial and punishment of franz kofler e...Joseph halow    innocent in dachau-the trial and punishment of franz kofler e...
Joseph halow innocent in dachau-the trial and punishment of franz kofler e...
 
Nuovo passeggino Trio Living Smart
Nuovo passeggino Trio Living SmartNuovo passeggino Trio Living Smart
Nuovo passeggino Trio Living Smart
 
Directorio De Proyectos En Pdf
Directorio De Proyectos En PdfDirectorio De Proyectos En Pdf
Directorio De Proyectos En Pdf
 
Compuestos 2 aramidas
Compuestos 2 aramidasCompuestos 2 aramidas
Compuestos 2 aramidas
 
Maven (EN ESPANOL)
Maven (EN ESPANOL)Maven (EN ESPANOL)
Maven (EN ESPANOL)
 
What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...
What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...
What You Can Do to Keep Your Email, Bank Accounts and Business Safe from Cybe...
 
Mini guía ciudad de barcelona
Mini guía ciudad de barcelonaMini guía ciudad de barcelona
Mini guía ciudad de barcelona
 

Similar to JAX-RS 2.0: What’s New in JSR 339 ?

Java EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurJava EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurTakashi Ito
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in actionAnkara JUG
 
Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Alex Kosowski
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Logico
 
MySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application DevelopmentMySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application DevelopmentHenry J. Kröger
 
Presentation oracle exalogic elastic cloud
Presentation   oracle exalogic elastic cloudPresentation   oracle exalogic elastic cloud
Presentation oracle exalogic elastic cloudsolarisyougood
 
Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001jucaab
 
Extending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-FinalExtending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-FinalRohit Dhamija
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesEdward Burns
 
WebSockets in Enterprise Applications
WebSockets in Enterprise ApplicationsWebSockets in Enterprise Applications
WebSockets in Enterprise ApplicationsPavel Bucek
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreFilipe Silva
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaTakashi Ito
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersBruno Borges
 
Hit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate MicroservicesHit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate MicroservicesBobby Curtis
 
Oracle goldegate microservice
Oracle goldegate microserviceOracle goldegate microservice
Oracle goldegate microserviceMojtaba Khandan
 
B7 api management_enabling_digital_transformation
B7 api management_enabling_digital_transformationB7 api management_enabling_digital_transformation
B7 api management_enabling_digital_transformationDr. Wilfred Lin (Ph.D.)
 

Similar to JAX-RS 2.0: What’s New in JSR 339 ? (20)

Java EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurJava EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil Gaur
 
Java EE for the Cloud
Java EE for the CloudJava EE for the Cloud
Java EE for the Cloud
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Finally, EE Security API JSR 375
Finally, EE Security API JSR 375
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)
 
MySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application DevelopmentMySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application Development
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Presentation oracle exalogic elastic cloud
Presentation   oracle exalogic elastic cloudPresentation   oracle exalogic elastic cloud
Presentation oracle exalogic elastic cloud
 
Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001
 
Extending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-FinalExtending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-Final
 
apiGrove
apiGroveapiGrove
apiGrove
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth Slides
 
WebSockets in Enterprise Applications
WebSockets in Enterprise ApplicationsWebSockets in Enterprise Applications
WebSockets in Enterprise Applications
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in Okinawa
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
Hit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate MicroservicesHit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate Microservices
 
Oracle goldegate microservice
Oracle goldegate microserviceOracle goldegate microservice
Oracle goldegate microservice
 
B7 api management_enabling_digital_transformation
B7 api management_enabling_digital_transformationB7 api management_enabling_digital_transformation
B7 api management_enabling_digital_transformation
 
40020
4002040020
40020
 

More from Arun Gupta

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdfArun Gupta
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Arun Gupta
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesArun Gupta
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerArun Gupta
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Arun Gupta
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open SourceArun Gupta
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using KubernetesArun Gupta
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native ApplicationsArun Gupta
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with KubernetesArun Gupta
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMArun Gupta
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Arun Gupta
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteArun Gupta
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Arun Gupta
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitArun Gupta
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeArun Gupta
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017Arun Gupta
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftArun Gupta
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersArun Gupta
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!Arun Gupta
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersArun Gupta
 

More from Arun Gupta (20)

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open Source
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using Kubernetes
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native Applications
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with Kubernetes
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAM
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's Landscape
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

JAX-RS 2.0: What’s New in JSR 339 ?

  • 1. 1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 2. JAX-RS 2.0: What’s New in JSR 339 ? Arun Gupta, Java EE & GlassFish Guy http://blogs.oracle.com/arungupta, @arungupta 2 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 3. Tokyo 2012 De 4 à 6 de Abril de 2012 San Francisco 2012 De 30 de Setembro à 4 de Outubro de 2012 3 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 4. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. 4 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 5. Part I: How we got here ? 5 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 6. How We Got Here? •  Shortest intro to JAX-RS 1.0 •  Requested features for JAX-RS 2.0 •  JSR 339: JAX-RS 2.0 6 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 7. JAX-RS Origins •  JAX-RS 1.0 is Java API for RESTful WS •  RESTFul Principles: –  Assign everything an ID –  Link things together –  Use common set of methods –  Allow multiple representations –  Stateless communications 7 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 8. JAX-RS 1.0 Goals •  POJO-Based API •  HTTP Centric •  Format Independence •  Container Independence •  Inclusion in Java EE 8 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 9. Example: JAX-RS API Resources @Path("/atm/{cardId}") URI Parameter public class AtmService { Injection @GET @Path("/balance") @Produces("text/plain") public String balance(@PathParam("cardId") String card, @QueryParam("pin") String pin) { return Double.toString(getBalance(card, pin)); } … HTTP Method Built-in Binding Serialization 9 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 10. Example: JAX-RS API (contd.) … Custom Serialization @POST @Path("/withdrawal") @Consumes("text/plain") @Produces("application/json") public Money withdraw(@PathParam("card") String card, @QueryParam("pin") String pin, String amount){ return getMoney(card, pin, amount); } } 10 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 11. Requested Features Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg MVC 11 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 12. JSR 339 Expert Group •  EG Formed in March 2011 •  Oracle Leads: Marek Potociar / Santiago Pericas-G. •  Expert Group: –  Jan Algermissen, Florent Benoit, Sergey Beryozkin (Talend), Adam Bien, Bill Burke (RedHat), Clinton Combs, Bill De Hora, Markus Karg, Sastry Malladi (Ebay), Julian Reschke, Guilherme Silveira, Dionysios Synodinos •  Early Draft published on Nov 1, 2011! 12 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 13. Part II: Where We Are Going 13 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 14. New in JAX-RS 2.0 ✔ ✔ Filters/Handlers Client API ✔ Hypermedia ✔ ✔ Async JSR 330 ✔ Validation Improved ✔ ✗ Conneg MVC 14 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 15. New in JAX-RS 2.0 Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg 15 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 16. Motivation •  HTTP client libraries too low level •  Sharing features with JAX-RS server API •  E.g., MBRs and MBWs •  Supported by some JAX-RS 1.0 implementations •  Need for a standard 16 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 17. Client API Resource Target Client Factory Client “atm” Configuration Resource Target Configuration Configuration “{cardId}” Resource Target Resource Target Invocation Request Builder “balance” “withdrawal” Response 17 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 18. Example: Client API // Get instance of Client Client client = ClientFactory.newClient(); Can also inject @URI for the target ß // Get account balance String bal = client.target("http://.../atm/balance") .pathParam("card", "111122223333") .queryParam("pin", "9876") .request("text/plain").get(String.class); 18 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 19. Example: Client API (contd.) // Withdraw some money Money mon = client.target("http://.../atm/withdraw") .pathParam("card", "111122223333") .queryParam("pin", "9876") .request("application/json") .post(text("50.0"), Money.class); 19 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 20. Example: Generic Interface (Command pattern, Batch processing) Invocation inv1 = client.target("http://.../atm/balance")… .request(“text/plain”).buildGet(); Invocation inv2 = client.target("http://.../atm/withdraw")… .request("application/json") .buildPost(text("50.0")); 20 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 21. Example: Generic Interface (contd.) Collection<Invocation> invs = Arrays.asList(inv1, inv2); Collection<Response> ress = Collections.transform(invs, new F<Invocation, Response>() { public Response apply(Invocation inv) { return inv.invoke(); } }); 21 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 22. Example: Configuration // Get client and register MyProvider1 Client client = ClientFactory.newClient(); client.configuration().register(MyProvider1.class); // Create atm and register MyProvider2 // Inherits MyProvider1 from client Target atm = client.target("http://.../atm"); atm.configuration().register(MyProvider2.class); // Create balance and register MyProvider3 // Inherits MyProvider1, MyProvider2 from atm Target balance = atm.path("balance"); // new instance balance.configuration().register(MyProvider3.class); 22 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 23. New in JAX-RS 2.0 Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg 23 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 24. Motivation •  Customize JAX-RS implementations via well-defined extension points •  Use Cases: Logging, Compression, Security, Etc. •  Shared by client and server APIs •  Supported by most JAX-RS 1.0 implementations •  All using slightly different types or semantics 24 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 25. Filters •  Non-wrapping extension points •  Pre: Interface RequestFilter •  Post: Interface ResponseFilter •  Part of a filter chain •  Do not call the next filter directly •  Each filter decides to proceed or break chain •  By returning FilterAction.NEXT or FilterAction.STOP 25 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 26. Filter Example: LoggingFilter @Provider class LoggingFilter implements RequestFilter, ResponseFilter { @Override public FilterAction preFilter(FilterContext ctx) throws IOException { logRequest(ctx.getRequest()); return FilterAction.NEXT; } … 26 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 27. Filter Example: LoggingFilter (contd.) @Override public FilterAction postFilter(FilterContext ctx) throws IOException { logResponse(ctx.getResponse()); return FilterAction.NEXT; } } 27 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 28. Handlers •  Wrapping extension points •  ReadFrom: Interface ReadFromHandler •  WriteTo: Interface WriteToHandler •  Part of a handler chain •  Call the next handler directly •  Each handler decides to proceed or break chain •  By calling ctx.proceed() 28 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 29. Handler Example: GzipHandler @Provider class GzipHandler implements ReadFromHandler, WriteToHandler { @Override public Object readFrom(ReadFromHandlerContext ctx) throws IOException { if (gzipEncoded(ctx)) { InputStream old = ctx.getInputStream(); ctx.setInputStream(new GZIPInputStream(old)); } return ctx.proceed(); } … } 29 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 30. Binding •  Associating filters and handlers with resource methods •  Same mechanism for filters and handlers Name Binding Global Binding @NameBinding/ Static DEFAULT @Qualifier? DynamicBinding DynamicBinding Dynamic interface Interface 30 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 31. Binding Example: LoggingFilter @NameBinding // or @Qualifier ? @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(value = RetentionPolicy.RUNTIME) public @interface Logged { } @Provider @Logged @BindingPriority(USER) public class LoggingFilter implements RequestFilter, ResponseFilter { … } 31 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 32. Binding Example: LoggingFilter @Path("/") public class MyResourceClass { @Logged @GET @Produces("text/plain") @Path("{name}") public String hello(@PathParam("name") String name) { return "Hello " + name; } } 32 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 33. New in JAX-RS 2.0 Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg 33 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 34. Motivation •  Services must validate data •  Bean Validation already provides the mechanism •  Integration into JAX-RS •  Support for constraint annotations in: •  Fields and properties •  Parameters (including request entity) •  Methods (response entities) •  Resource classes 34 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 35. Example: Constraint Annotations @Path("/") class MyResourceClass { @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) Built-in public void registerUser( @NotNull @FormParam("firstName") String fn, Custom @NotNull @FormParam("lastName") String ln, @Email @FormParam("email") String em) { ... } } 35 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 36. Example: User defined Constraints @Target({ METHOD, FIELD, PARAMETER }) @Retention(RUNTIME) @Constraint(validatedBy = EmailValidator.class) public @interface Email { ... } class EmailValidator implements ConstraintValidator<Email, String> { public void initialize(Email email) { … } public boolean isValid(String value, ConstraintValidatorContext context) { // Check 'value' is e-mail address … } } 36 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 37. Example: Request Entity Validation @CheckUser1 class User { ... } @Path("/") class MyResourceClass { @POST @Consumes("application/xml") public void registerUser1(@Valid User u) { … } @POST @Consumes("application/json") public void registerUser12(@CheckUser2 @Valid User u) { … } } 37 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 38. New in JAX-RS 2.0 Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg 38 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 39. Motivation •  Let “borrowed” threads run free! •  Container environment •  Suspend and resume connections •  Suspend while waiting for an event •  Resume when event arrives •  Leverage Servlet 3.X async support (if available) •  Client API support •  Future<RESPONSE>, InvocationCallback<RESPONSE> 39 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 40. Example: Suspend and Resume @Path("/async/longRunning") public class MyResource { @Context private ExecutionContext ctx; @GET @Produces("text/plain") public void longRunningOp() { Executors.newSingleThreadExecutor().submit( new Runnable() { public void run() { Thread.sleep(10000); // Sleep 10 secs ctx.resume("Hello async world!"); } }); ctx.suspend(); // Suspend connection and return } … } 40 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 41. Example: @Suspend Annotation @Path("/async/longRunning") public class MyResource { @Context private ExecutionContext ctx; @GET @Produces("text/plain") @Suspend public void longRunning() { Executors.newSingleThreadExecutor().submit( new Runnable() { public void run() { Thread.sleep(10000); // Sleep 10 secs ctx.resume("Hello async world!"); } }); // ctx.suspend(); Suspend connection and return } … } 41 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 42. Example: Client API Async Support // Build target URI Target target = client.target("http://.../atm/balance")… // Start async call and register callback Future<?> handle = target.request().async().get( new InvocationCallback<String>() { public void complete(String balance) { … } public void failed(InvocationException e) { … } }); // After waiting for a while … If (!handle.isDone()) handle.cancel(true); 42 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 43. New in JAX-RS 2.0 Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg 43 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 44. Motivation •  REST principles •  Identifiers and Links •  HATEOAS (Hypermedia As The Engine Of App State) •  Link types: •  Structural Links •  Transitional Links 44 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 45. Example: Structural vs. Transitional Links Link: <http://.../orders/1/ship>; rel=ship, <http://.../orders/1/cancel>; rel=cancel Transitional ... <order id="1"> <customer>http://.../customers/11</customer> <address>http://.../customers/11/address/1</customer> <items> <item> Structural <product>http://.../products/111</products> <quantity>2</quantity> </item> ... </order> 45 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 46. Current Proposal Transitional Links Only •  Link and LinkBuilder classes •  RFC 5988: Web Linking •  Support for Link in ResponseBuilder •  Create Target from Link in Client API 46 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 47. Example: Using Transitional Links // Server API Response res = Response.ok(order) .link("http://.../orders/1/ship", "ship") .build(); // Client API Response order = client.target(…) .request("application/xml").get(); if (order.getLink(“ship”) != null) { Response shippedOrder = client .target(order.getLink("ship")) .request("application/xml").post(null); … } 47 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 48. New in JAX-RS 2.0 Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg 48 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 49. Improved Conneg GET http://.../widgets2 Accept: text/*; q=1 … Path("widgets2") public class WidgetsResource2 { @GET @Produces("text/plain", "text/html") public Widgets getWidget() {...} } 49 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 50. Improved Conneg (contd.) GET http://.../widgets2 Accept: text/*; q=1 … Path("widgets2") public class WidgetsResource2 { @GET @Produces("text/plain;qs=0.5", "text/html;qs=0.75") public Widgets getWidget() {...} } 50 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 51. Other Topics Under Consideration •  Better integration with JSR 330 •  Support @Inject and qualifiers •  High-level client API? 51 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 52. More Information •  JSR: http://jcp.org/en/jsr/detail?id=339 •  Java.net: http://java.net/projects/jax-rs-spec •  User Alias: users@jax-rs-spec.java.net •  All EG discussions forwarded to this list 52 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 53. Q&A 53 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 54. 54 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.