Class DeploymentScanner.EnvironmentConfig

java.lang.Object
org.eclipse.jetty.deploy.DeploymentScanner.EnvironmentConfig
Enclosing class:
DeploymentScanner

public static class DeploymentScanner.EnvironmentConfig extends Object
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 Details

    • loadProperties

      public void loadProperties(Path path) throws IOException
      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

      public void loadPropertiesFromPathName(String pathName) throws IOException
      Convenience method for loadProperties(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

      public void setConfigurationClasses(String configurations)
      This is equivalent to setting the Deployable.CONFIGURATION_CLASSES attribute.
      Parameters:
      configurations - The configuration class names as a comma separated list
      See Also:
    • setConfigurationClasses

      public void setConfigurationClasses(String[] configurations)
      This is equivalent to setting the Deployable.CONFIGURATION_CLASSES property.
      Parameters:
      configurations - The configuration class names.
      See Also:
    • setContainerScanJarPattern

      public void setContainerScanJarPattern(String pattern)
      This is equivalent to setting the Deployable.CONTAINER_SCAN_JARS property.
      Parameters:
      pattern - The regex pattern to use when bytecode scanning container jars
      See Also:
    • setDefaultContextHandlerClass

      public void setDefaultContextHandlerClass(Class<? extends ContextHandler> contextHandlerClass)
      The default class that this environment uses to create ContextHandler instances (supports a class that implements java.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

      public void setDefaultContextHandlerClassName(String className)
      The name of the default class that this environment uses to create ContextHandler instances (supports a class that implements java.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

      public void setDefaultsDescriptor(String defaultsDescriptor)
      Set the defaultsDescriptor. This is equivalent to setting the Deployable.DEFAULTS_DESCRIPTOR attribute.
      Parameters:
      defaultsDescriptor - the defaultsDescriptor to set
      See Also:
    • setExtractWars

      public void setExtractWars(boolean extractWars)
      This is equivalent to setting the Deployable.EXTRACT_WARS attribute.
      Parameters:
      extractWars - the extractWars to set
      See Also:
    • setParentLoaderPriority

      public void setParentLoaderPriority(boolean parentLoaderPriority)
      This is equivalent to setting the Deployable.PARENT_LOADER_PRIORITY attribute.
      Parameters:
      parentLoaderPriority - the parentLoaderPriority to set
      See Also:
    • setServletContainerInitializerExclusionPattern

      public void setServletContainerInitializerExclusionPattern(String pattern)
      This is equivalent to setting the Deployable.SCI_EXCLUSION_PATTERN property.
      Parameters:
      pattern - The regex pattern to exclude ServletContainerInitializers from executing
      See Also:
    • setServletContainerInitializerOrder

      public void setServletContainerInitializerOrder(String order)
      This is equivalent to setting the Deployable.SCI_ORDER property.
      Parameters:
      order - The ordered list of ServletContainerInitializer classes to run
      See Also:
    • setWebInfScanJarPattern

      public void setWebInfScanJarPattern(String pattern)
      This is equivalent to setting the Deployable.WEBINF_SCAN_JARS property.
      Parameters:
      pattern - The regex pattern to use when bytecode scanning web-inf jars
      See Also: