java.lang.Object
org.xbib.net.path.simple.PathResolver<T>
- Typparameter:
T- type
- Alle implementierten Schnittstellen:
PathResolver<T>
A simple resolver that maps pairs of method names and parameterized paths to arbitrary data. Each
node in the tree is a path segment. For example, given a path "discovery/v1/apis", the data would
be stored in the node path represented by "discovery" -> "v1" -> "apis". A path is
considered parameterized if one or more segments is of the form "{name}". When a parameterized
path is resolved, a map from parameter names to raw String values is returned as part of the
result. Null values are not acceptable values. Parameter names can only contain
alphanumeric characters or underscores, and cannot start with a numeric.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classA builder for creating aPathResolver.static classThe resulting information for a successful path resolution, which includes the value to which the path maps, as well as the raw string values of all path parameters.Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.xbib.net.path.PathResolver
PathResolver.ResultListener<T> -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <T> PathResolver.Builder<T> builder()Returns a new, path conflict validatingPathResolver.Builder.static <T> PathResolver.Builder<T> builder(boolean throwOnConflict) Returns a newPathResolver.Builder.voidresolve(String method, String path, PathResolver.ResultListener<T> resultListener) Attempts to resolve a path.toString()
-
Methodendetails
-
resolve
public void resolve(String method, String path, PathResolver.ResultListener<T> resultListener) throws org.xbib.net.ParameterException Attempts to resolve a path. Resolution prefers literal paths over path parameters. The result includes the object to which the path mapped, as well a map from parameter names to values. If the path cannot be resolved, null is returned.- Angegeben von:
resolvein SchnittstellePathResolver<T>- Parameter:
method- methodpath- pathresultListener- result listener- Löst aus:
org.xbib.net.ParameterException
-
toString
-
builder
Returns a new, path conflict validatingPathResolver.Builder.- Typparameter:
T- the type that the resolver will be storing- Gibt zurück:
- the builder
-
builder
Returns a newPathResolver.Builder.- Typparameter:
T- the type that the resolver will be storing- Parameter:
throwOnConflict- whether or not to throw an exception on path conflicts- Gibt zurück:
- the builder
-