|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.module.apikit.uri.URIResolver
public class URIResolver
A URI pattern resolver identifies the URI pattern and variables values given a specific URI.
This class is typically used as follows:
// Create a resolver instance
URIResolver resolver = new URIResolver("http://www.acme.com/test/home");
// Find the matching pattern amongst a list of precompiled URI patterns
URIPattern pattern = resolver.find(patterns);
// Resolve the URI for the specified pattern, the result holds all the matching info
URIResolveResult result = resolver.resolve(p);
| Nested Class Summary | |
|---|---|
static class |
URIResolver.MatchRule
Defines the priority rule for matching patterns. |
| Constructor Summary | |
|---|---|
URIResolver(String uri)
Creates a new resolver for the specified URI. |
|
| Method Summary | |
|---|---|
URIPattern |
find(Set<URIPattern> patterns)
Returns the first URI pattern in the list which matches the underlying URI. |
URIPattern |
find(Set<URIPattern> patterns,
URIResolver.MatchRule rule)
Returns the first URI pattern in the list which matches the underlying URI. |
Collection<URIPattern> |
findAll(Set<URIPattern> patterns)
Returns all the URI patterns in the list which match the underlying URI. |
URIResolveResult |
resolve(URIPattern pattern)
Resolves the given URI pattern. |
URIResolveResult |
resolve(URIPattern pattern,
VariableBinder binder)
Resolves the given URI pattern using the specified variable binder. |
String |
uri()
Returns the URI handled by this resolver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URIResolver(String uri)
uri - The URI to resolve.| Method Detail |
|---|
public String uri()
public URIPattern find(Set<URIPattern> patterns)
patterns - The URI patterns available.
null.
public URIPattern find(Set<URIPattern> patterns,
URIResolver.MatchRule rule)
patterns - The URI patterns available.rule - The rule used to select the matching patterns in case of multiple matches.
null.public Collection<URIPattern> findAll(Set<URIPattern> patterns)
patterns - The URI patterns available.
public URIResolveResult resolve(URIPattern pattern)
pattern - The pattern to resolve.
public URIResolveResult resolve(URIPattern pattern,
VariableBinder binder)
pattern - The pattern to resolve.binder - The variable binder.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||