Class AbstractJettyServiceBuilder

java.lang.Object
com.linecorp.armeria.server.jetty.AbstractJettyServiceBuilder
Direct Known Subclasses:
JettyServiceBuilder

public abstract class AbstractJettyServiceBuilder extends Object
A skeletal builder implementation for JettyServiceBuilder in Jetty 9 and Jetty 10+ modules.
  • Method Details

    • hostname

      public AbstractJettyServiceBuilder hostname(String hostname)
      Sets the default hostname of the Jetty Server.
    • attr

      public AbstractJettyServiceBuilder attr(String name, Object attribute)
      Puts the specified attribute into the Jetty Server.
      See Also:
      • Server.setAttribute(String, Object)
    • bean

      public AbstractJettyServiceBuilder bean(Object bean)
      Adds the specified bean to the Jetty Server.
      See Also:
      • ContainerLifeCycle.addBean(Object)
    • bean

      public AbstractJettyServiceBuilder bean(Object bean, boolean managed)
      Adds the specified bean to the Jetty Server.
      See Also:
      • ContainerLifeCycle.addBean(Object, boolean)
    • dumpAfterStart

      public AbstractJettyServiceBuilder dumpAfterStart(boolean dumpAfterStart)
      Sets whether the Jetty Server needs to dump its configuration after it started up.
      See Also:
      • Server.setDumpAfterStart(boolean)
    • dumpBeforeStop

      public AbstractJettyServiceBuilder dumpBeforeStop(boolean dumpBeforeStop)
      Sets whether the Jetty Server needs to dump its configuration before it shuts down.
      See Also:
      • Server.setDumpBeforeStop(boolean)
    • handler

      public AbstractJettyServiceBuilder handler(org.eclipse.jetty.server.Handler handler)
      Sets the Handler of the Jetty Server.
      See Also:
      • HandlerWrapper.setHandler(Handler)
    • handlerWrapper

      public AbstractJettyServiceBuilder handlerWrapper(org.eclipse.jetty.server.handler.HandlerWrapper handlerWrapper)
      Adds the specified HandlerWrapper to the Jetty Server.
      See Also:
      • HandlerWrapper.insertHandler(HandlerWrapper)
    • httpConfiguration

      public AbstractJettyServiceBuilder httpConfiguration(org.eclipse.jetty.server.HttpConfiguration httpConfiguration)
      Adds the specified HttpConfiguration to the Jetty Server. This method is a type-safe alias of bean(Object).
    • requestLog

      public AbstractJettyServiceBuilder requestLog(org.eclipse.jetty.server.RequestLog requestLog)
      Sets the RequestLog of the Jetty Server.
      See Also:
      • Server.setRequestLog(RequestLog)
    • sessionIdManager

      public AbstractJettyServiceBuilder sessionIdManager(org.eclipse.jetty.server.SessionIdManager sessionIdManager)
      Sets the SessionIdManager of the Jetty Server. This method is a shortcut for:
      
       sessionIdManagerFactory(server -> sessionIdManager);
       
      See Also:
      • Server.setSessionIdManager(SessionIdManager)
    • sessionIdManagerFactory

      public AbstractJettyServiceBuilder sessionIdManagerFactory(Function<? super org.eclipse.jetty.server.Server,? extends org.eclipse.jetty.server.SessionIdManager> sessionIdManagerFactory)
      Sets the factory that creates a new instance of SessionIdManager for the Jetty Server.
      See Also:
      • Server.setSessionIdManager(SessionIdManager)
    • stopTimeoutMillis

      public AbstractJettyServiceBuilder stopTimeoutMillis(long stopTimeoutMillis)
      Sets the graceful stop time of the AbstractLifeCycle.stop() in milliseconds.
      See Also:
      • Server.setStopTimeout(long)
    • tlsReverseDnsLookup

      public AbstractJettyServiceBuilder tlsReverseDnsLookup(boolean tlsReverseDnsLookup)
      Sets whether Jetty has to perform reverse DNS lookup for the remote IP address on a TLS connection. By default, this flag is disabled because it is known to cause performance issues when the DNS server is not responsive enough. However, you might want to take the risk and enable it if you want the same behavior with Jetty 9.3 when mTLS is enabled.
      See Also:
    • customizer

      public AbstractJettyServiceBuilder customizer(Consumer<? super org.eclipse.jetty.server.Server> customizer)
      Adds a Consumer that performs additional configuration operations against the Jetty Server created by a JettyService.
    • configurator

      @Deprecated public AbstractJettyServiceBuilder configurator(Consumer<? super org.eclipse.jetty.server.Server> configurator)
      Deprecated.
      Adds a Consumer that performs additional configuration operations against the Jetty Server created by a JettyService.