Package org.eclipse.jetty.http.pathmap
Class MatchedResource<E>
- java.lang.Object
-
- org.eclipse.jetty.http.pathmap.MatchedResource<E>
-
- Type Parameters:
E
- the type of resource (IncludeExclude uses boolean, WebSocket uses endpoint/endpoint config, servlet uses ServletHolder, etc)
public class MatchedResource<E> extends java.lang.Object
The match details when usingPathMappings.getMatched(String)
, used to minimize return to the PathSpec or PathMappings for subsequent details that are now provided by theMatchedPath
instance.
-
-
Constructor Summary
Constructors Constructor Description MatchedResource(E resource, PathSpec pathSpec, MatchedPath matchedPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPathInfo()
Return the portion of the path that is after the path spec.java.lang.String
getPathMatch()
Return the portion of the path that matches a path spec.PathSpec
getPathSpec()
E
getResource()
static <E> MatchedResource<E>
of(java.util.Map.Entry<PathSpec,E> mapping, MatchedPath matchedPath)
-
-
-
Constructor Detail
-
MatchedResource
public MatchedResource(E resource, PathSpec pathSpec, MatchedPath matchedPath)
-
-
Method Detail
-
of
public static <E> MatchedResource<E> of(java.util.Map.Entry<PathSpec,E> mapping, MatchedPath matchedPath)
-
getPathSpec
public PathSpec getPathSpec()
-
getResource
public E getResource()
-
getPathMatch
public java.lang.String getPathMatch()
Return the portion of the path that matches a path spec.- Returns:
- the path name portion of the match.
-
getPathInfo
public java.lang.String getPathInfo()
Return the portion of the path that is after the path spec.- Returns:
- the path info portion of the match, or null if there is no portion after the
getPathMatch()
-
-