Package org.jvnet.hudson.test.jetty
Class JettyProvider
java.lang.Object
org.jvnet.hudson.test.jetty.JettyProvider
- Direct Known Subclasses:
Jetty12EE10Provider
,Jetty12EE9Provider
Defines a way for
JenkinsRule
to run Jetty. This permits the test harness to select the appropriate Jakarta
EE version based on the version of Jenkins core under test. The constructor should try to link against everything
necessary so any errors are thrown up front.- Author:
- Basil Crow
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
configureCompression
(org.eclipse.jetty.server.Handler handler) protected final org.eclipse.jetty.server.ServerConnector
createConnector
(int localPort) protected final void
abstract JettyProvider.Context
createWebServer
(int localPort, String contextPath, Supplier<org.eclipse.jetty.security.LoginService> loginServiceSupplier) Prepares a webapp hosting environment and returns a context containing theServletContext
, port, and server for testing.
-
Field Details
-
server
protected org.eclipse.jetty.server.Server server
-
-
Constructor Details
-
JettyProvider
public JettyProvider()
-
-
Method Details
-
createWebServer
public abstract JettyProvider.Context createWebServer(int localPort, String contextPath, Supplier<org.eclipse.jetty.security.LoginService> loginServiceSupplier) throws Exception Prepares a webapp hosting environment and returns a context containing theServletContext
, port, and server for testing.- Throws:
Exception
-
createServer
protected final void createServer() -
createConnector
protected final org.eclipse.jetty.server.ServerConnector createConnector(int localPort) -
configureCompression
protected final void configureCompression(org.eclipse.jetty.server.Handler handler)
-