Enum Class PathSpecGroup

java.lang.Object
java.lang.Enum<PathSpecGroup>
org.eclipse.jetty.http.pathmap.PathSpecGroup
All Implemented Interfaces:
Serializable, Comparable<PathSpecGroup>, Constable

public enum PathSpecGroup extends Enum<PathSpecGroup>
Types of path spec groups.

This is used to facilitate proper pathspec search order.

Search Order:

  1. Enum.ordinal() [increasing]
  2. PathSpec.getSpecLength() [decreasing]
  3. PathSpec.getDeclaration() [natural sort order]
  • Enum Constant Details

    • ROOT

      public static final PathSpecGroup ROOT
      The root spec for accessing the Root behavior.
         ""           - servlet spec       (Root Servlet)
         null         - legacy             (Root Servlet)
       
      Note: there is no known uri-template spec variant of this kind of path spec
    • EXACT

      public static final PathSpecGroup EXACT
      For exactly defined path specs, no glob.
    • MIDDLE_GLOB

      public static final PathSpecGroup MIDDLE_GLOB
      For path specs that have a hardcoded prefix and suffix with wildcard glob in the middle.
         "^/downloads/[^/]*.zip$"  - regex spec
         "/a/{var}/c"              - uri-template spec
       
      Note: there is no known servlet spec variant of this kind of path spec
    • PREFIX_GLOB

      public static final PathSpecGroup PREFIX_GLOB
      For path specs that have a hardcoded prefix and a trailing wildcard glob.
         "/downloads/*"          - servlet spec
         "/api/*"                - servlet spec
         "^/rest/.*$"            - regex spec
         "/bookings/{guest-id}"  - uri-template spec
         "/rewards/{vip-level}"  - uri-template spec
       
    • SUFFIX_GLOB

      public static final PathSpecGroup SUFFIX_GLOB
      For path specs that have a wildcard glob with a hardcoded suffix
         "*.do"        - servlet spec
         "*.css"       - servlet spec
         "^.*\.zip$"   - regex spec
       
      Note: there is no known uri-template spec variant of this kind of path spec
    • DEFAULT

      public static final PathSpecGroup DEFAULT
      The default spec for accessing the Default path behavior.
         "/"           - servlet spec      (Default Servlet)
         "/"           - uri-template spec (Root Context)
         "^/$"         - regex spec        (Root Context)
       
      Per Servlet Spec, pathInfo is always null for these specs. If nothing above matches, then default will match.
  • Method Details

    • values

      public static PathSpecGroup[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PathSpecGroup valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null