Class JettyService

java.lang.Object
com.linecorp.armeria.server.jetty.JettyService
All Implemented Interfaces:
com.linecorp.armeria.common.util.Unwrappable, com.linecorp.armeria.server.HttpService, com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>

public final class JettyService extends Object implements com.linecorp.armeria.server.HttpService
An HttpService that dispatches its requests to a web application running in an embedded Jetty.
See Also:
  • Method Details

    • of

      public static JettyService of(Server jettyServer)
      Creates a new JettyService from an existing Jetty Server.
      Parameters:
      jettyServer - the Jetty Server
    • of

      public static JettyService of(Server jettyServer, @Nullable @Nullable String hostname)
      Creates a new JettyService from an existing Jetty Server.
      Parameters:
      jettyServer - the Jetty Server
      hostname - the default hostname, or null to use Armeria's default virtual host name.
    • of

      public static JettyService of(Server jettyServer, @Nullable @Nullable String hostname, boolean tlsReverseDnsLookup)
      Creates a new JettyService from an existing Jetty Server.
      Parameters:
      jettyServer - the Jetty Server
      hostname - the default hostname, or null to use Armeria's default virtual host name.
      tlsReverseDnsLookup - whether perform reverse DNS lookup for the remote IP address on a TLS connection. See JettyServiceBuilder.tlsReverseDnsLookup(boolean) for more information.
    • builder

      public static JettyServiceBuilder builder()
      Returns a new JettyServiceBuilder.
    • serviceAdded

      public void serviceAdded(com.linecorp.armeria.server.ServiceConfig cfg)
      Specified by:
      serviceAdded in interface com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
    • serve

      public com.linecorp.armeria.common.HttpResponse serve(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.HttpRequest req)
      Specified by:
      serve in interface com.linecorp.armeria.server.HttpService
      Specified by:
      serve in interface com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
    • exchangeType

      public com.linecorp.armeria.common.ExchangeType exchangeType(com.linecorp.armeria.server.RoutingContext routingContext)
      Specified by:
      exchangeType in interface com.linecorp.armeria.server.HttpService