{title:'Overview', created:'8.0.0'}

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 Core Microservices 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.JettyMicroservice.Builder} - 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. | ; | } | }