Package org.eclipse.jetty.http.pathmap
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.DumpablePath Mappings of PathSpec to Resource.Sorted into search order upon entry into the Set
-
-
Constructor Summary
Constructors Constructor Description PathMappings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PathSpecasPathSpec(String pathSpecString)Stringdump()voiddump(Appendable out, String indent)Eget(PathSpec spec)List<MappedResource<E>>getMappings()MappedResource<E>getMatch(String path)List<MappedResource<E>>getMatches(String path)Return a list of MappedResource matches for the specified path.Iterator<MappedResource<E>>iterator()booleanput(String pathSpecString, E resource)booleanput(PathSpec pathSpec, E resource)booleanremove(PathSpec pathSpec)voidremoveIf(Predicate<MappedResource<E>> predicate)voidreset()intsize()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
dump
public String dump()
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable
-
dump
public void dump(Appendable out, String indent) throws IOException
- Specified by:
dumpin interfaceorg.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)
-
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
-
getMatch
public MappedResource<E> getMatch(String path)
-
iterator
public Iterator<MappedResource<E>> iterator()
-
remove
public boolean remove(PathSpec pathSpec)
-
-