Class JettyHttpServer

java.lang.Object
com.github.tomakehurst.wiremock.jetty.JettyHttpServer
All Implemented Interfaces:
com.github.tomakehurst.wiremock.http.HttpServer
Direct Known Subclasses:
Jetty12HttpServer

public abstract class JettyHttpServer extends Object implements com.github.tomakehurst.wiremock.http.HttpServer
  • Field Details

    • FILES_URL_MATCH

      protected static final String FILES_URL_MATCH
    • GZIPPABLE_METHODS

      protected static final String[] GZIPPABLE_METHODS
    • options

      protected final com.github.tomakehurst.wiremock.core.Options options
    • jettySettings

      protected final JettySettings jettySettings
    • jettyServer

      protected final org.eclipse.jetty.server.Server jettyServer
    • httpConnector

      protected final org.eclipse.jetty.server.ServerConnector httpConnector
    • httpsConnector

      protected final org.eclipse.jetty.server.ServerConnector httpsConnector
    • messageStubRequestHandler

      protected final com.github.tomakehurst.wiremock.message.MessageStubRequestHandler messageStubRequestHandler
    • scheduledExecutorService

      protected ScheduledExecutorService scheduledExecutorService
  • Constructor Details

    • JettyHttpServer

      public JettyHttpServer(com.github.tomakehurst.wiremock.core.Options options, com.github.tomakehurst.wiremock.http.AdminRequestHandler adminRequestHandler, com.github.tomakehurst.wiremock.http.StubRequestHandler stubRequestHandler, JettySettings jettySettings, org.eclipse.jetty.util.thread.ThreadPool threadPool, com.github.tomakehurst.wiremock.message.MessageStubRequestHandler messageStubRequestHandler)
  • Method Details

    • applyAdditionalServerConfiguration

      protected void applyAdditionalServerConfiguration(org.eclipse.jetty.server.Server jettyServer, com.github.tomakehurst.wiremock.core.Options options)
    • createHandler

      protected abstract org.eclipse.jetty.server.Handler createHandler(com.github.tomakehurst.wiremock.core.Options options, com.github.tomakehurst.wiremock.http.AdminRequestHandler adminRequestHandler, com.github.tomakehurst.wiremock.http.StubRequestHandler stubRequestHandler)
    • finalizeSetup

      protected void finalizeSetup()
    • createServer

      protected org.eclipse.jetty.server.Server createServer(org.eclipse.jetty.util.thread.ThreadPool threadPool)
    • extensionHandlers

      public org.eclipse.jetty.server.Handler[] extensionHandlers()
      Extend only this method if you want to add additional handlers to Jetty.
    • start

      public void start()
      Specified by:
      start in interface com.github.tomakehurst.wiremock.http.HttpServer
    • stop

      public void stop()
      Specified by:
      stop in interface com.github.tomakehurst.wiremock.http.HttpServer
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface com.github.tomakehurst.wiremock.http.HttpServer
    • port

      public int port()
      Specified by:
      port in interface com.github.tomakehurst.wiremock.http.HttpServer
    • httpsPort

      public int httpsPort()
      Specified by:
      httpsPort in interface com.github.tomakehurst.wiremock.http.HttpServer
    • stopTimeout

      public long stopTimeout()
    • createHttpConnector

      protected abstract org.eclipse.jetty.server.ServerConnector createHttpConnector(String bindAddress, int port, JettySettings jettySettings, org.eclipse.jetty.io.NetworkTrafficListener listener)
    • createHttpsConnector

      protected abstract org.eclipse.jetty.server.ServerConnector createHttpsConnector(String bindAddress, com.github.tomakehurst.wiremock.common.HttpsSettings httpsSettings, JettySettings jettySettings, org.eclipse.jetty.io.NetworkTrafficListener listener)
    • buildMultipartRequestConfigurer

      protected MultipartRequestConfigElementBuilder buildMultipartRequestConfigurer()