org.jboss.msc.service
Class ServiceNameMapper<V>
java.lang.Object
org.jboss.msc.service.ServiceNameMapper<V>
public final class ServiceNameMapper<V>
- extends Object
A mapper for service names which allows a service name or pattern to be correlated with a value. If more than one
pattern matches a service name, the best match is chosen; if there are multiple best matches then an arbitrary one
is selected.
- Author:
- David M. Lloyd
Field Summary |
static Object |
ANY
The special marker which represents a pattern match. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ANY
public static final Object ANY
- The special marker which represents a pattern match.
ServiceNameMapper
public ServiceNameMapper()
registerMatcher
public void registerMatcher(V value,
Object... segments)
- Register a matcher for a specific location.
- Parameters:
value
- the value to registersegments
- the segments to match
match
public V match(ServiceName serviceName)
- Attempt to match a service name.
- Parameters:
serviceName
- the service name
- Returns:
- the value result, or
null
if no match was found
Copyright © 2011 JBoss, a division of Red Hat, Inc.