Class DeploymentScanner.EnvironmentConfig
java.lang.Object
org.eclipse.jetty.deploy.DeploymentScanner.EnvironmentConfig
- Enclosing class:
DeploymentScanner
Builder of a deployment configuration for a specific
Environment
.
Results in Attributes
for Environment
containing the
deployment configuration (as Deployable
keys) that is applied to all deployable
apps belonging to that Environment
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
loadProperties
(Path path) Load a java properties file as a set of Attributes for this Environment.void
loadPropertiesFromPathName
(String pathName) Convenience method forloadProperties(Path.of(pathName))
, called from Jetty XML files.void
setConfigurationClasses
(String configurations) This is equivalent to setting theDeployable.CONFIGURATION_CLASSES
attribute.void
setConfigurationClasses
(String[] configurations) This is equivalent to setting theDeployable.CONFIGURATION_CLASSES
property.void
setContainerScanJarPattern
(String pattern) This is equivalent to setting theDeployable.CONTAINER_SCAN_JARS
property.void
setDefaultContextHandlerClass
(Class<? extends ContextHandler> contextHandlerClass) The default class that this environment uses to createContextHandler
instances (supports a class that implementsjava.util.function.Supplier<ContextHandler>
as well).void
setDefaultContextHandlerClassName
(String className) The name of the default class that this environment uses to createContextHandler
instances (supports a class that implementsjava.util.function.Supplier<ContextHandler>
as well).void
setDefaultsDescriptor
(String defaultsDescriptor) Set the defaultsDescriptor.void
setExtractWars
(boolean extractWars) This is equivalent to setting theDeployable.EXTRACT_WARS
attribute.void
setParentLoaderPriority
(boolean parentLoaderPriority) This is equivalent to setting theDeployable.PARENT_LOADER_PRIORITY
attribute.void
This is equivalent to setting theDeployable.SCI_EXCLUSION_PATTERN
property.void
This is equivalent to setting theDeployable.SCI_ORDER
property.void
setWebInfScanJarPattern
(String pattern) This is equivalent to setting theDeployable.WEBINF_SCAN_JARS
property.
-
Method Details
-
loadProperties
Load a java properties file as a set of Attributes for this Environment.- Parameters:
path
- the path of the properties file- Throws:
IOException
- if unable to read the properties file
-
loadPropertiesFromPathName
Convenience method forloadProperties(Path.of(pathName))
, called from Jetty XML files.- Parameters:
pathName
- the name of the path to load.- Throws:
IOException
- if unable to read the properties file- See Also:
-
setConfigurationClasses
This is equivalent to setting theDeployable.CONFIGURATION_CLASSES
attribute.- Parameters:
configurations
- The configuration class names as a comma separated list- See Also:
-
setConfigurationClasses
This is equivalent to setting theDeployable.CONFIGURATION_CLASSES
property.- Parameters:
configurations
- The configuration class names.- See Also:
-
setContainerScanJarPattern
This is equivalent to setting theDeployable.CONTAINER_SCAN_JARS
property.- Parameters:
pattern
- The regex pattern to use when bytecode scanning container jars- See Also:
-
setDefaultContextHandlerClass
The default class that this environment uses to createContextHandler
instances (supports a class that implementsjava.util.function.Supplier<ContextHandler>
as well).This is the fallback class used, if the context class itself isn't defined by the web application being deployed (such as from a Jetty XML).
- Parameters:
contextHandlerClass
- the default class for this environment's ContextHandler.- See Also:
-
setDefaultContextHandlerClassName
The name of the default class that this environment uses to createContextHandler
instances (supports a class that implementsjava.util.function.Supplier<ContextHandler>
as well).This is the fallback class used, if the context class itself isn't defined by the web application being deployed. (such as from an XML definition)
- Parameters:
className
- the default class name for this environment's context deployable.- See Also:
-
setDefaultsDescriptor
Set the defaultsDescriptor. This is equivalent to setting theDeployable.DEFAULTS_DESCRIPTOR
attribute.- Parameters:
defaultsDescriptor
- the defaultsDescriptor to set- See Also:
-
setExtractWars
public void setExtractWars(boolean extractWars) This is equivalent to setting theDeployable.EXTRACT_WARS
attribute.- Parameters:
extractWars
- the extractWars to set- See Also:
-
setParentLoaderPriority
public void setParentLoaderPriority(boolean parentLoaderPriority) This is equivalent to setting theDeployable.PARENT_LOADER_PRIORITY
attribute.- Parameters:
parentLoaderPriority
- the parentLoaderPriority to set- See Also:
-
setServletContainerInitializerExclusionPattern
This is equivalent to setting theDeployable.SCI_EXCLUSION_PATTERN
property.- Parameters:
pattern
- The regex pattern to exclude ServletContainerInitializers from executing- See Also:
-
setServletContainerInitializerOrder
This is equivalent to setting theDeployable.SCI_ORDER
property.- Parameters:
order
- The ordered list of ServletContainerInitializer classes to run- See Also:
-
setWebInfScanJarPattern
This is equivalent to setting theDeployable.WEBINF_SCAN_JARS
property.- Parameters:
pattern
- The regex pattern to use when bytecode scanning web-inf jars- See Also:
-