public final class ServiceNameMapper<V>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ServiceNameMapper.Node<V> |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
ANY
The special marker which represents a pattern match.
|
private ServiceNameMapper.Node<V> |
root |
| Constructor and Description |
|---|
ServiceNameMapper() |
| Modifier and Type | Method and Description |
|---|---|
private void |
doRegisterMatcher(java.lang.Object[] segments,
int idx,
V value,
ServiceNameMapper.Node<V> current) |
V |
match(ServiceName serviceName)
Attempt to match a service name.
|
private V |
match(java.lang.String[] segments,
int idx,
ServiceNameMapper.Node<V> current) |
void |
registerMatcher(V value,
java.lang.Object... segments)
Register a matcher for a specific location.
|
public static final java.lang.Object ANY
private final ServiceNameMapper.Node<V> root
public void registerMatcher(V value, java.lang.Object... segments)
value - the value to registersegments - the segments to matchprivate void doRegisterMatcher(java.lang.Object[] segments,
int idx,
V value,
ServiceNameMapper.Node<V> current)
public V match(ServiceName serviceName)
serviceName - the service namenull if no match was foundprivate V match(java.lang.String[] segments, int idx, ServiceNameMapper.Node<V> current)