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 Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final String[]protected final org.eclipse.jetty.server.ServerConnectorprotected final org.eclipse.jetty.server.ServerConnectorprotected final org.eclipse.jetty.server.Serverprotected final JettySettingsprotected final com.github.tomakehurst.wiremock.message.MessageStubRequestHandlerprotected final com.github.tomakehurst.wiremock.core.Optionsprotected ScheduledExecutorService -
Constructor Summary
ConstructorsConstructorDescriptionJettyHttpServer(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 Summary
Modifier and TypeMethodDescriptionprotected voidapplyAdditionalServerConfiguration(org.eclipse.jetty.server.Server jettyServer, com.github.tomakehurst.wiremock.core.Options options) protected MultipartRequestConfigElementBuilderprotected abstract org.eclipse.jetty.server.HandlercreateHandler(com.github.tomakehurst.wiremock.core.Options options, com.github.tomakehurst.wiremock.http.AdminRequestHandler adminRequestHandler, com.github.tomakehurst.wiremock.http.StubRequestHandler stubRequestHandler) protected abstract org.eclipse.jetty.server.ServerConnectorcreateHttpConnector(String bindAddress, int port, JettySettings jettySettings, org.eclipse.jetty.io.NetworkTrafficListener listener) protected abstract org.eclipse.jetty.server.ServerConnectorcreateHttpsConnector(String bindAddress, com.github.tomakehurst.wiremock.common.HttpsSettings httpsSettings, JettySettings jettySettings, org.eclipse.jetty.io.NetworkTrafficListener listener) protected org.eclipse.jetty.server.ServercreateServer(org.eclipse.jetty.util.thread.ThreadPool threadPool) org.eclipse.jetty.server.Handler[]Extend only this method if you want to add additional handlers to Jetty.protected voidintbooleanintport()voidstart()voidstop()long
-
Field Details
-
FILES_URL_MATCH
-
GZIPPABLE_METHODS
-
options
protected final com.github.tomakehurst.wiremock.core.Options options -
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
-
-
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:
startin interfacecom.github.tomakehurst.wiremock.http.HttpServer
-
stop
public void stop()- Specified by:
stopin interfacecom.github.tomakehurst.wiremock.http.HttpServer
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfacecom.github.tomakehurst.wiremock.http.HttpServer
-
port
public int port()- Specified by:
portin interfacecom.github.tomakehurst.wiremock.http.HttpServer
-
httpsPort
public int httpsPort()- Specified by:
httpsPortin interfacecom.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
-