public class ServiceRegistry
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ServiceRegistry.RegistryKey |
Constructor and Description |
---|
ServiceRegistry() |
Modifier and Type | Method and Description |
---|---|
Service<?> |
get(ServiceRegistry.RegistryKey key) |
java.util.Collection<java.lang.Class<? extends Service<?>>> |
getClasses() |
static ServiceRegistry |
getInstance() |
ResourcePath |
getMatchedPath(ResourcePath requestPath,
java.lang.String contentType) |
protected ServiceRegistry.RegistryKey |
getPathMatch(ServiceRegistry.RegistryKey key)
The best registered path match is determined by the longest matching sequence of path segments.
|
static Provider |
getProvider() |
protected java.lang.Class<? extends Service<?>> |
getServiceClass(ServiceRegistry.RegistryKey key) |
void |
put(ServiceRegistry.RegistryKey key,
java.lang.Class<? extends RestService<?>> service) |
static void |
setProvider(Provider serviceProvider) |
public static ServiceRegistry getInstance()
public static Provider getProvider()
public static void setProvider(Provider serviceProvider)
public void put(ServiceRegistry.RegistryKey key, java.lang.Class<? extends RestService<?>> service)
public Service<?> get(ServiceRegistry.RegistryKey key) throws ServiceException, java.lang.InstantiationException, java.lang.IllegalAccessException
ServiceException
java.lang.InstantiationException
java.lang.IllegalAccessException
protected java.lang.Class<? extends Service<?>> getServiceClass(ServiceRegistry.RegistryKey key)
protected ServiceRegistry.RegistryKey getPathMatch(ServiceRegistry.RegistryKey key)
public ResourcePath getMatchedPath(ResourcePath requestPath, java.lang.String contentType)
public java.util.Collection<java.lang.Class<? extends Service<?>>> getClasses()
Copyright © 2018