Class EmbeddedJettyConfiguration.Builder
java.lang.Object
com.github.mjeanroy.junit.servers.servers.AbstractConfigurationBuilder<EmbeddedJettyConfiguration.Builder,EmbeddedJettyConfiguration>
com.github.mjeanroy.junit.servers.jetty.EmbeddedJettyConfiguration.Builder
- Enclosing class:
EmbeddedJettyConfiguration
public static class EmbeddedJettyConfiguration.Builder
extends AbstractConfigurationBuilder<EmbeddedJettyConfiguration.Builder,EmbeddedJettyConfiguration>
Builder for
EmbeddedJettyConfiguration
instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the final configuration instance.SetstopAtShutdown
tofalse
.SetstopAtShutdown
totrue
.org.eclipse.jetty.util.resource.Resource
Get currentbaseResource
value.Get currentcontainerJarPattern
value.int
Get currentstopTimeout
value.Get currentwebInfJarPattern
value.boolean
Get currentdirAllowed
value.boolean
Get currentstopAtShutdown
value.protected EmbeddedJettyConfiguration.Builder
self()
Thethis
object, useful to get correct chaining.withBaseResource
(org.eclipse.jetty.util.resource.Resource resource) ChangebaseResource
value.withContainerJarPattern
(String containerJarPattern) ChangecontainerJarPattern
value.withDirAllowed
(boolean dirAllowed) ChangedirAllowed
value.withStopTimeout
(int stopTimeout) UpdatestopTimeout
value.withWebInfJarPattern
(String webInfJarPattern) ChangewebInfJarPattern
value.Methods inherited from class com.github.mjeanroy.junit.servers.servers.AbstractConfigurationBuilder
getClasspath, getEnvProperties, getHooks, getOverrideDescriptor, getParentClassLoader, getPath, getPort, getWebapp, withClasspath, withHook, withOverrideDescriptor, withParentClassLoader, withParentClasspath, withParentClasspath, withPath, withPort, withProperty, withWebapp, withWebapp
-
Method Details
-
self
Description copied from class:AbstractConfigurationBuilder
Thethis
object, useful to get correct chaining.- Specified by:
self
in classAbstractConfigurationBuilder<EmbeddedJettyConfiguration.Builder,
EmbeddedJettyConfiguration> - Returns:
- this.
-
build
Description copied from class:AbstractConfigurationBuilder
Build the final configuration instance.- Specified by:
build
in classAbstractConfigurationBuilder<EmbeddedJettyConfiguration.Builder,
EmbeddedJettyConfiguration> - Returns:
- The configuration instance.
-
getStopTimeout
public int getStopTimeout()Get currentstopTimeout
value.- Returns:
stopTimeout
.
-
isStopAtShutdown
public boolean isStopAtShutdown()Get currentstopAtShutdown
value.- Returns:
stopAtShutdown
.
-
getBaseResource
public org.eclipse.jetty.util.resource.Resource getBaseResource()Get currentbaseResource
value.- Returns:
baseResource
.
-
getContainerJarPattern
Get currentcontainerJarPattern
value.- Returns:
containerJarPattern
-
getWebInfJarPattern
Get currentwebInfJarPattern
value.- Returns:
webInfJarPattern
-
isDirAllowed
public boolean isDirAllowed()Get currentdirAllowed
value.- Returns:
dirAllowed
-
withStopTimeout
UpdatestopTimeout
value.- Parameters:
stopTimeout
- NewstopTimeout
value.- Returns:
- this
- Throws:
IllegalArgumentException
- IfstopTimeout
is not positive.
-
disableStopAtShutdown
SetstopAtShutdown
tofalse
.- Returns:
- this
-
enableStopAtShutdown
SetstopAtShutdown
totrue
.- Returns:
- this
-
withBaseResource
public EmbeddedJettyConfiguration.Builder withBaseResource(org.eclipse.jetty.util.resource.Resource resource) ChangebaseResource
value.- Parameters:
resource
- NewbaseResource
value.- Returns:
- this
-
withContainerJarPattern
ChangecontainerJarPattern
value.- Parameters:
containerJarPattern
- The container JAR pattern.- Returns:
- this
-
withWebInfJarPattern
ChangewebInfJarPattern
value.- Parameters:
webInfJarPattern
- The webinf JAR pattern.- Returns:
- this
-
withDirAllowed
ChangedirAllowed
value.- Parameters:
dirAllowed
- Directory listing flag.- Returns:
- this
-