Class PathMappings<E>

java.lang.Object
org.eclipse.jetty.http.pathmap.PathMappings<E>
Type Parameters:
E - the type of mapping endpoint
All Implemented Interfaces:
Iterable<MappedResource<E>>, org.eclipse.jetty.util.component.Dumpable

@ManagedObject("Path Mappings") public class PathMappings<E> extends Object implements Iterable<MappedResource<E>>, org.eclipse.jetty.util.component.Dumpable
Path Mappings of PathSpec to Resource.

Sorted into search order upon entry into the Set

  • Constructor Details

    • PathMappings

      public PathMappings()
  • Method Details

    • dump

      public String dump()
      Specified by:
      dump in interface org.eclipse.jetty.util.component.Dumpable
    • dump

      public void dump(Appendable out, String indent) throws IOException
      Specified by:
      dump in interface org.eclipse.jetty.util.component.Dumpable
      Throws:
      IOException
    • getMappings

      @ManagedAttribute(value="mappings", readonly=true) public List<MappedResource<E>> getMappings()
    • size

      public int size()
    • reset

      public void reset()
    • removeIf

      public void removeIf(Predicate<MappedResource<E>> predicate)
    • getMatchedList

      public List<MatchedResource<E>> getMatchedList(String path)
      Return a list of MatchedResource matches for the specified path.
      Parameters:
      path - the path to return matches on
      Returns:
      the list of mapped resource the path matches on
    • getMatches

      public List<MappedResource<E>> getMatches(String path)
      Return a list of MappedResource matches for the specified path.
      Parameters:
      path - the path to return matches on
      Returns:
      the list of mapped resource the path matches on
    • getMatched

      public MatchedResource<E> getMatched(String path)
    • getMatch

      @Deprecated(forRemoval=true) public MappedResource<E> getMatch(String path)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use getMatched(String) instead
    • iterator

      public Iterator<MappedResource<E>> iterator()
      Specified by:
      iterator in interface Iterable<E>
    • asPathSpec

      @Deprecated(forRemoval=true) public static PathSpec asPathSpec(String pathSpecString)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • get

      public E get(PathSpec spec)
    • put

      public boolean put(String pathSpecString, E resource)
    • put

      public boolean put(PathSpec pathSpec, E resource)
    • remove

      public boolean remove(PathSpec pathSpec)
    • toString

      public String toString()
      Overrides:
      toString in class Object