Parse and evaluate the argument into a Name.
Parse and evaluate the argument into a Name. Eval parses a simple grammar: a scheme is followed by a bang, followed by an argument: name := scheme ! arg The scheme is looked up from registered Resolvers, and the argument is passed in.
When name
begins with the character '/' it is interpreted to be
a logical name whose interpretation is subject to a
Dtab.
Eval throws exceptions upon failure to parse the name, or on failure to scheme lookup. Since names are late bound, binding failures are deferred.
Resolvers.eval for Java support
Parse and evaluate the argument into a (Name, label: String) tuple.
Parse and evaluate the argument into a (Name, label: String) tuple.
Arguments are parsed with the same grammar as in eval
. If a label is not
provided (i.e. no "label=<addr>"), then the empty string is returned.
Resolvers.evalLabeled for Java support
Resolve a group from an address, a string.
Resolve a group from an address, a string. Resolve uses
Resolver
s to do this. These are loaded via the Java
ServiceLoader
mechanism. The default resolver is "inet", resolving DNS
name/port pairs.
Target names have a simple grammar: The name of the resolver precedes the name of the address to be resolved, separated by an exclamation mark ("bang"). For example: inet!twitter.com:80 resolves the name "twitter.com:80" using the "inet" resolver. If no resolver name is present, the inet resolver is used.
Names resolved by this mechanism are also a
com.twitter.finagle.LabelledGroup. By default, this name is
simply the addr
string, but it can be overridden by prefixing
a name separated by an equals sign from the rest of the addr.
For example, the addr "www=inet!google.com:80" resolves
"google.com:80" with the inet resolver, but the returned group's
com.twitter.finagle.LabelledGroup name is "www".
(Since version 6.7.x) Use Resolver.eval
The default Resolver used by Finagle.
Resolvers for Java support.