public static class ServiceNameProvider.DefaultProvider extends Object implements ServiceNameProvider
ServiceNameProvider implementation that provides
a service name that is created by splitting the capability name
on any '.' character.ServiceNameProvider.DefaultProvider| Constructor and Description |
|---|
DefaultProvider(String capabilityName)
Creates a provider for the given capability that provides no service names.
|
DefaultProvider(String capabilityName,
Class legalType)
Creates a provider for the given capability that provides no a service name for the given type.
|
DefaultProvider(String capabilityName,
Map<Class,org.jboss.msc.service.ServiceName> services)
Creates a provider for the given capability that provides the given service names for the given types.
|
| Modifier and Type | Method and Description |
|---|---|
static org.jboss.msc.service.ServiceName |
capabilityToServiceName(String capabilityName)
Converts a capability name to a service name by splitting the capability name on any '.' character.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(Class<?> serviceType)
Gets the name of a service provided by the capability.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(Class<?> serviceType,
String dynamicPortion)
Gets the name of a service provided by the capability, including a dynamic portion
of the capability name that won't be known at compile time.
|
public DefaultProvider(String capabilityName)
capabilityName - the capability name. Cannot be null or emptypublic DefaultProvider(String capabilityName, Class legalType)
capabilityName - the capability name. Cannot be null or emptylegalType - the type for which service names should be provided. Cannot be nullpublic DefaultProvider(String capabilityName, Map<Class,org.jboss.msc.service.ServiceName> services)
capabilityName - the capability name. Cannot be null or emptyservices - the mapping of valid types to services names. Cannot be null, but can be emptypublic static org.jboss.msc.service.ServiceName capabilityToServiceName(String capabilityName)
capabilityName - the capability name. Cannot be null or emptynullpublic org.jboss.msc.service.ServiceName getCapabilityServiceName(Class<?> serviceType)
ServiceNameProvidergetCapabilityServiceName in interface ServiceNameProviderserviceType - the expected type of the service's value. Cannot be nullnullpublic org.jboss.msc.service.ServiceName getCapabilityServiceName(Class<?> serviceType, String dynamicPortion)
ServiceNameProvidergetCapabilityServiceName in interface ServiceNameProviderserviceType - the expected type of the service's value. Cannot be nulldynamicPortion - the dynamic portion of the name. Cannot be nullnullCopyright © 2015 JBoss by Red Hat. All rights reserved.