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:
java.lang.Iterable<MappedResource<E>>
,Dumpable
@ManagedObject("Path Mappings") public class PathMappings<E> extends java.lang.Object implements java.lang.Iterable<MappedResource<E>>, Dumpable
Path 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 PathSpec
asPathSpec(java.lang.String pathSpecString)
java.lang.String
dump()
void
dump(java.lang.Appendable out, java.lang.String indent)
E
get(PathSpec spec)
java.util.List<MappedResource<E>>
getMappings()
MappedResource<E>
getMatch(java.lang.String path)
java.util.List<MappedResource<E>>
getMatches(java.lang.String path)
Return a list of MappedResource matches for the specified path.java.util.Iterator<MappedResource<E>>
iterator()
boolean
put(java.lang.String pathSpecString, E resource)
boolean
put(PathSpec pathSpec, E resource)
boolean
remove(PathSpec pathSpec)
void
removeIf(java.util.function.Predicate<MappedResource<E>> predicate)
void
reset()
int
size()
java.lang.String
toString()
-
-
-
Method Detail
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
-
getMappings
@ManagedAttribute(value="mappings", readonly=true) public java.util.List<MappedResource<E>> getMappings()
-
size
public int size()
-
reset
public void reset()
-
removeIf
public void removeIf(java.util.function.Predicate<MappedResource<E>> predicate)
-
getMatches
public java.util.List<MappedResource<E>> getMatches(java.lang.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(java.lang.String path)
-
iterator
public java.util.Iterator<MappedResource<E>> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<E>
-
asPathSpec
public static PathSpec asPathSpec(java.lang.String pathSpecString)
-
put
public boolean put(java.lang.String pathSpecString, E resource)
-
remove
public boolean remove(PathSpec pathSpec)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-