SlideShare uma empresa Scribd logo
1 de 48
JAX-RS 2.0: RESTful Java on Steroids
Arun Gupta, Java EE & GlassFish Guy
http://blogs.oracle.com/arungupta, @arungupta
 1   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.




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




3   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




4   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



5   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




6   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



 7   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);
            }
}




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

                                                                 Filters/Handlers
                                       Client API

                                                                                    Hypermedia
                            Async                                JSR 330

                                                                                     Validation
                                    Improved
                                     Conneg                          MVC

9   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 2 published on Feb 9, 2012!


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




11   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

12   Copyright © 2011, Oracle and/or its affiliates. All rights
     reserved.
New in JAX-RS 2.0
                                                                  ✔     Interceptors
                                        Client API                        /Handlers

                                                                                       Hypermedia
                             Async                                    JSR 330

                                                                                        Validation
                                     Improved
                                      Conneg

13   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




14   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);


16   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);




17   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"));




18   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();
      }
    });


19   Copyright © 2011, Oracle and/or its affiliates. All rights
     reserved.
New in JAX-RS 2.0
                                                                                       ✔
                                                                  ✔     Interceptors
                                        Client API                        /Handlers

                                                                                       Hypermedia
                             Async                                    JSR 330

                                                                                        Validation
                                     Improved
                                      Conneg

21   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




22   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



23   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;
            }

            …
 24   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;
          }

}



    25   Copyright © 2011, Oracle and/or its affiliates. All rights
         reserved.
Interceptors

     • Wrapping extension points
       • ReadFrom: Interface ReaderInterceptor
       • WriteTo: Interface WriterInterceptor

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



26   Copyright © 2011, Oracle and/or its affiliates. All rights
     reserved.
Handler Example: GzipInterceptor
@Provider
class GzipInterceptor implements ReaderInterceptor,
WriterInterceptor {

       @Override
       public Object aroundreadFrom(ReadInterceptorContext ctx)
           throws IOException {
           if (gzipEncoded(ctx)) {
               InputStream old = ctx.getInputStream();
               ctx.setInputStream(new GZIPInputStream(old));
           }
           return ctx.proceed();
       }
… }
  27   Copyright © 2011, Oracle and/or its affiliates. All rights
       reserved.
Order of execution

          Request                                             WriteTo   Request            ReadFrom
           Filter                                             Handler    Filter             Handler




       ReadFrom                                            Response     WriteTo            Response
        Handler                                              Filter     Handler              Filter

                                        Client                                    Server




28   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
     public class LoggingFilter implements RequestFilter,
         ResponseFilter
     { … }



30   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;
                  }
     }



31   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

32   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


33   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,
                                  @NotNull @FormParam("lastName") String ln,
Custom
                                  @Email @FormParam("email") String em) {
                                  ... }
       }



  34   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
             … } }

35   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) {
… }
}
 36   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

37   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>


38   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
         } … }
39   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
           } … }
40   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);


41   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

42   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




43   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>


44   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);
  … }
46   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

47   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() {...}
        }

48   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() {...}
        }

49   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?




50   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




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


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

Mais conteúdo relacionado

Mais procurados

PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012Arun Gupta
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012Arun Gupta
 
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 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013Jagadish Prasath
 
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
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX London
 
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
 

Mais procurados (9)

PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
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 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013
 
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
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
 
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?
 

Destaque

Destaque (15)

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
 
JCP version 2.10, Broadening JCP Membership (aka JSR 364)
JCP version 2.10, Broadening JCP Membership (aka JSR 364)JCP version 2.10, Broadening JCP Membership (aka JSR 364)
JCP version 2.10, Broadening JCP Membership (aka JSR 364)
 
Concurrency Patterns
Concurrency PatternsConcurrency Patterns
Concurrency Patterns
 
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
 
Maven (EN ESPANOL)
Maven (EN ESPANOL)Maven (EN ESPANOL)
Maven (EN ESPANOL)
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Java desde cero maven
Java desde cero mavenJava desde cero maven
Java desde cero maven
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Death by PowerPoint
Death by PowerPointDeath by PowerPoint
Death by PowerPoint
 

Semelhante a JAX-RS 2.0: RESTful Java on Steroids, by Aron 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
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Logico
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
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
 
Oracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API ExamplesOracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API ExamplesBobby Curtis
 
From Open Source to Open API with Restlet
From Open Source to Open API with RestletFrom Open Source to Open API with Restlet
From Open Source to Open API with RestletRestlet
 
How to Use Stormpath in angular js
How to Use Stormpath in angular jsHow to Use Stormpath in angular js
How to Use Stormpath in angular jsStormpath
 
Using Istio to Secure & Monitor Your Services
Using Istio to Secure & Monitor Your ServicesUsing Istio to Secure & Monitor Your Services
Using Istio to Secure & Monitor Your ServicesAlcide
 
Coherence RoadMap 2018
Coherence RoadMap 2018Coherence RoadMap 2018
Coherence RoadMap 2018harvraja
 
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
 
Fifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty MinutesFifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty MinutesArun Gupta
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutesglassfish
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Max Andersen
 
Hadoop Summit San Diego Feb2013
Hadoop Summit San Diego Feb2013Hadoop Summit San Diego Feb2013
Hadoop Summit San Diego Feb2013Narayan Bharadwaj
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxcgt38842
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOFglassfish
 
Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Alex Kosowski
 

Semelhante a JAX-RS 2.0: RESTful Java on Steroids, by Aron Gupta (20)

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
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)
 
Java EE7
Java EE7Java EE7
Java EE7
 
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
 
Oracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API ExamplesOracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API Examples
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
From Open Source to Open API with Restlet
From Open Source to Open API with RestletFrom Open Source to Open API with Restlet
From Open Source to Open API with Restlet
 
How to Use Stormpath in angular js
How to Use Stormpath in angular jsHow to Use Stormpath in angular js
How to Use Stormpath in angular js
 
Using Istio to Secure & Monitor Your Services
Using Istio to Secure & Monitor Your ServicesUsing Istio to Secure & Monitor Your Services
Using Istio to Secure & Monitor Your Services
 
Building web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend ExpressiveBuilding web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend Expressive
 
Coherence RoadMap 2018
Coherence RoadMap 2018Coherence RoadMap 2018
Coherence RoadMap 2018
 
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
 
Fifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty MinutesFifty New Features of Java EE 7 in Fifty Minutes
Fifty New Features of Java EE 7 in Fifty Minutes
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutes
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
Hadoop Summit San Diego Feb2013
Hadoop Summit San Diego Feb2013Hadoop Summit San Diego Feb2013
Hadoop Summit San Diego Feb2013
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptx
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOF
 
Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Finally, EE Security API JSR 375
Finally, EE Security API JSR 375
 

Mais de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Mais de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Último

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Último (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

JAX-RS 2.0: RESTful Java on Steroids, by Aron Gupta

  • 1. JAX-RS 2.0: RESTful Java on Steroids Arun Gupta, Java EE & GlassFish Guy http://blogs.oracle.com/arungupta, @arungupta 1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 2. 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. 2 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 3. Part I: How we got here ? 3 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 4. How We Got Here? • Shortest intro to JAX-RS 1.0 • Requested features for JAX-RS 2.0 • JSR 339: JAX-RS 2.0 4 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 5. 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 5 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 6. JAX-RS 1.0 Goals • POJO-Based API • HTTP Centric • Format Independence • Container Independence • Inclusion in Java EE 6 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 7. 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 7 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 8. 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); } } 8 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 9. Requested Features Filters/Handlers Client API Hypermedia Async JSR 330 Validation Improved Conneg MVC 9 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 10. 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 2 published on Feb 9, 2012! 10 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 11. Part II: Where We Are Going 11 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 12. New in JAX-RS 2.0 ✔ ✔ Filters/Handlers Client API ✔ Hypermedia ✔ ✔ Async JSR 330 ✔ Validation Improved ✔ ✗ Conneg MVC 12 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 13. New in JAX-RS 2.0 ✔ Interceptors Client API /Handlers Hypermedia Async JSR 330 Validation Improved Conneg 13 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 14. 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 14 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 15. 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); 16 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 16. 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); 17 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 17. 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")); 18 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 18. 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(); } }); 19 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 19. New in JAX-RS 2.0 ✔ ✔ Interceptors Client API /Handlers Hypermedia Async JSR 330 Validation Improved Conneg 21 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 20. 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 22 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 21. 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 23 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 22. Filter Example: LoggingFilter @Provider class LoggingFilter implements RequestFilter, ResponseFilter { @Override public FilterAction preFilter(FilterContext ctx) throws IOException { logRequest(ctx.getRequest()); return FilterAction.NEXT; } … 24 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 23. Filter Example: LoggingFilter (contd.) @Override public FilterAction postFilter(FilterContext ctx) throws IOException { logResponse(ctx.getResponse()); return FilterAction.NEXT; } } 25 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 24. Interceptors • Wrapping extension points • ReadFrom: Interface ReaderInterceptor • WriteTo: Interface WriterInterceptor • Part of a interceptor chain • Call the next handler directly • Each handler decides to proceed or break chain • By calling ctx.proceed() 26 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 25. Handler Example: GzipInterceptor @Provider class GzipInterceptor implements ReaderInterceptor, WriterInterceptor { @Override public Object aroundreadFrom(ReadInterceptorContext ctx) throws IOException { if (gzipEncoded(ctx)) { InputStream old = ctx.getInputStream(); ctx.setInputStream(new GZIPInputStream(old)); } return ctx.proceed(); } … } 27 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 26. Order of execution Request WriteTo Request ReadFrom Filter Handler Filter Handler ReadFrom Response WriteTo Response Handler Filter Handler Filter Client Server 28 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 27. Binding Example: LoggingFilter @NameBinding // or @Qualifier ? @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(value = RetentionPolicy.RUNTIME) public @interface Logged { } @Provider @Logged public class LoggingFilter implements RequestFilter, ResponseFilter { … } 30 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 28. Binding Example: LoggingFilter @Path("/") public class MyResourceClass { @Logged @GET @Produces("text/plain") @Path("{name}") public String hello(@PathParam("name") String name) { return "Hello " + name; } } 31 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 29. New in JAX-RS 2.0 ✔ ✔ Filters/Handlers Client API Hypermedia ✔ Async JSR 330 ✔ Validation Improved Conneg 32 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 30. 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 33 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 31. Example: Constraint Annotations @Path("/") class MyResourceClass { @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) Built-in public void registerUser( @NotNull @FormParam("firstName") String fn, @NotNull @FormParam("lastName") String ln, Custom @Email @FormParam("email") String em) { ... } } 34 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 32. 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 … } } 35 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 33. 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) { … } } 36 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 34. New in JAX-RS 2.0 ✔ ✔ Filters/Handlers Client API Hypermedia ✔ ✔ Async JSR 330 ✔ Validation Improved Conneg 37 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 35. 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> 38 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 36. 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 } … } 39 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 37. 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 } … } 40 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 38. 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); 41 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 39. New in JAX-RS 2.0 ✔ ✔ Filters/Handlers Client API ✔ Hypermedia ✔ ✔ Async JSR 330 ✔ Validation Improved Conneg 42 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 40. Motivation • REST principles • Identifiers and Links • HATEOAS (Hypermedia As The Engine Of App State) • Link types: • Structural Links • Transitional Links 43 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 41. 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> 44 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 42. 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); … } 46 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 47 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 44. Improved Conneg GET http://.../widgets2 Accept: text/*; q=1 … Path("widgets2") public class WidgetsResource2 { @GET @Produces("text/plain", "text/html") public Widgets getWidget() {...} } 48 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 45. 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() {...} } 49 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 46. Other Topics Under Consideration • Better integration with JSR 330 • Support @Inject and qualifiers • High-level client API? 50 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 47. 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 51 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
  • 48. Q&A 52 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

Notas do Editor

  1. Lawyer’s slideDon’t use any info for contracts or purchase decisionsDevelopment, release and timing at the discretion of Oracle
  2. What’s coming?Duke dressed up with funky goggles and some sort of jet pack
  3. To learn where we are going, we need to understand where we are
  4. There was clear need for a Java API for RESTWhat is REST?Stateless communications: new requests don’t depend on old requests
  5. POJO centric: no complicated or contrived contracts – just annotationsContainer independence: JAX-RS does not require servlets or any type of container
  6. Use @Path to define web resourcesUse other annotations to map requests to methodsUse method return value as responseMBR and MBW help us behind the scenes
  7. MBR and MBW can be user defined too
  8. Don’t spend time describing these features, just read them quickly
  9. There are 12 EG membersED submitted for publication to the PMO last Friday
  10. What’s coming?Duke dressed up with funky goggles and some sort of jet pack
  11. Don’t spend time describing these features, just read them quickly
  12. Don’t spend time describing these features, just read them quickly
  13. Don’t spend time describing these features, just read them quickly
  14. Don’t spend time describing these features, just read them quickly
  15. Don’t spend time describing these features, just read them quickly
  16. Don’t spend time describing these features, just read them quickly
  17. A structural link is used to avoid sending a complete representation of a resource. Clients can follow these type of links to retrieve the &quot;pieces&quot; they need. A transitional link is used to update the state of a resource and is typically identified by a &quot;rel&quot; attribute. Structural links are normally in the entity; transitional links could be in link headers or the entity.
  18. Don’t spend time describing these features, just read them quickly
  19. A high-level API isn&apos;t actually required, but some people prefer a proxy-based solution to writing clients. We do not have any plans to support one at this point.