{8.0.0-new, 8.1.2-deprecated} Overview

The Jetty Microservice API consists of a combination of the Juneau Core, Server, and Client APIs and an embedded Eclipse Jetty Servlet Container.

The API builds upon the {@doc juneau-microservice-core Core Microservice} classes to produce easy-to-create and easy-to-use microservices in a standard Java 1.8+ environment.

The juneau-microservice-jetty library consists of the following classes:

- {@link oaj.microservice.jetty}
  - {@link oaj.microservice.jetty.JettyMicroservice} - The Jetty microservice class.
  - {@link oaj.microservice.jetty.JettyMicroserviceBuilder} - Builder for the microservice class.
  - {@link oaj.microservice.jetty.JettyMicroserviceListener} - Interface for hooking into lifecyle events of the microservice.
    - {@link oaj.microservice.jetty.BasicJettyMicroserviceListener} - Adapter for JettyMicroserviceListener class.
  - {@link oaj.microservice.jetty.JettyServerFactory} - Interface for defining custom Jetty servers.
    - {@link oaj.microservice.jetty.BasicJettyServerFactory} - Adapter for JettyServerFactory class.

The most-basic creation of a Jetty microservice from an entry-point method is shown below:

public class App { public static void main(String[] args) { JettyMicroservice .create() // Create builder. .args(args) // Pass in args. .servlets(RootResource.class) // A Juneau RestServlet class. .build() // Create microservice. .start() // Start microservice. ; } }