2 // ========================================================================
3 // Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
4 // ------------------------------------------------------------------------
5 // All rights reserved. This program and the accompanying materials
6 // are made available under the terms of the Eclipse Public License v1.0
7 // and Apache License v2.0 which accompanies this distribution.
9 // The Eclipse Public License is available at
10 // http://www.eclipse.org/legal/epl-v10.html
12 // The Apache License v2.0 is available at
13 // http://www.opensource.org/licenses/apache2.0.php
15 // You may elect to redistribute this code under either of these licenses.
16 // ========================================================================
19 package org.eclipse.jetty.http.pathmap;
22 * Types of path spec groups.
24 * This is used to facilitate proper pathspec search order.
28 * <li>{@link PathSpecGroup#ordinal()} [increasing]</li>
29 * <li>{@link PathSpec#specLength} [decreasing]</li>
30 * <li>{@link PathSpec#pathSpec} [natural sort order]</li>
33 public enum PathSpecGroup
35 // NOTE: Order of enums determines order of Groups.
38 * For exactly defined path specs, no glob.
42 * For path specs that have a hardcoded prefix and suffix with wildcard glob in the middle.
45 * "^/downloads/[^/]*.zip$" - regex spec
46 * "/a/{var}/c" - uri-template spec
49 * Note: there is no known servlet spec variant of this kind of path spec
53 * For path specs that have a hardcoded prefix and a trailing wildcard glob.
57 * "/downloads/*" - servlet spec
58 * "/api/*" - servlet spec
59 * "^/rest/.*$" - regex spec
60 * "/bookings/{guest-id}" - uri-template spec
61 * "/rewards/{vip-level}" - uri-template spec
66 * For path specs that have a wildcard glob with a hardcoded suffix
69 * "*.do" - servlet spec
70 * "*.css" - servlet spec
71 * "^.*\.zip$" - regex spec
74 * Note: there is no known uri-template spec variant of this kind of path spec
78 * The root spec for accessing the Root behavior.
81 * "" - servlet spec (Root Servlet)
82 * null - servlet spec (Root Servlet)
85 * Note: there is no known uri-template spec variant of this kind of path spec
89 * The default spec for accessing the Default path behavior.
92 * "/" - servlet spec (Default Servlet)
93 * "/" - uri-template spec (Root Context)
94 * "^/$" - regex spec (Root Context)
97 * Per Servlet Spec, pathInfo is always null for these specs.
98 * If nothing above matches, then default will match.