Search code examples
javarestjerseyrestlet

difference between jersey Rest apis and org.restlet apis


I am new to rest apis in java.I found ,there are mainly two methods to create Rest Apis in java.One method is using Jersey and other i think is using org.restlet (not sure i mean without jersey).so whats the main difference between these two.


Solution

  • Restlet provides an API to build and consume RESTful applications. It provides a wide support of HTTP headers and mechanisms described in REST. It also comes with a set of pluggable features like:

    • Content negotiation - support of the Accept* header
    • Routing - provide a flexible way to build the processing chain (filter, authenticator, server resource)
    • Authentication - a frame to plug existing scheme for security at the level of the Authorization header
    • Converter - a frame to integrate entities to serialize / deserialize structured content like JSON, XML, YAML
    • Connector - a frame to register and use tools (like Jetty) for serving and calling RESTful applications

    Jersey is an implementation of the JAXRS specification. You can notice that Restlet also provides an implementation of this specification through its JAXRS extension: https://restlet.com/technical-resources/restlet-framework/guide/2.3/extensions/jaxrs.