T - the type of the runtime API object exposed by the capabilitypublic class RuntimeCapability<T> extends AbstractCapability
| Modifier and Type | Class and Description |
|---|---|
static class |
RuntimeCapability.Builder<T>
Builder for a
RuntimeCapability. |
| Constructor and Description |
|---|
RuntimeCapability(String name,
T runtimeAPI,
Set<String> requirements)
Deprecated.
|
RuntimeCapability(String name,
T runtimeAPI,
Set<String> requirements,
Set<String> optionalRequirements)
Deprecated.
|
RuntimeCapability(String name,
T runtimeAPI,
String... requirements)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
buildDynamicCapabilityName(String baseName,
String dynamicNameElement)
Constructs a full capability name from a static base name and a dynamic element.
|
static <T> RuntimeCapability<T> |
fromBaseCapability(RuntimeCapability<T> base,
String dynamicElement)
Creates a fully named capability from a
dynamically named base
capability. |
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(Class serviceType)
Gets the name of service provided by this capability whose value is of the given type.
|
T |
getRuntimeAPI()
Object encapsulating the API exposed by this capability to other capabilities that require it, if it does
expose such an API.
|
equals, getDynamicName, getDynamicOptionalRequirements, getDynamicRequirements, getName, getOptionalRequirements, getRequirements, getRuntimeOnlyRequirements, hashCode, isDynamicallyNamed, toString@Deprecated public RuntimeCapability(String name, T runtimeAPI, Set<String> requirements, Set<String> optionalRequirements)
RuntimeCapability.Buildername - the name of the capability. Cannot be nullruntimeAPI - implementation of the API exposed by this capability to other capabilities. May be nullrequirements - names of other capabilities upon which this capability has a hard requirement. May be nulloptionalRequirements - names of other capabilities upon which this capability has an optional requirement. May be null@Deprecated public RuntimeCapability(String name, T runtimeAPI, Set<String> requirements)
RuntimeCapability.Buildername - the name of the capability. Cannot be nullruntimeAPI - implementation of the API exposed by this capability to other capabilities. May be nullrequirements - names of other capabilities upon which this capability has a hard requirement. May be null@Deprecated public RuntimeCapability(String name, T runtimeAPI, String... requirements)
RuntimeCapability.Buildername - the name of the capability. Cannot be nullruntimeAPI - implementation of the API exposed by this capability to other capabilities. May be nullrequirements - names of other capabilities upon which this capability has a hard requirement. May be nullpublic static String buildDynamicCapabilityName(String baseName, String dynamicNameElement)
baseName - the base name. Cannot be nulldynamicNameElement - the dynamic portion of the name. Cannot be nullnullpublic static <T> RuntimeCapability<T> fromBaseCapability(RuntimeCapability<T> base, String dynamicElement)
dynamically named base
capability. Capability providers should use this method to generate fully named capabilities in logic
that handles dynamically named resources.T - the type of the runtime API object exposed by the capabilitybase - the base capability. Cannot be null, and AbstractCapability.isDynamicallyNamed() must return truedynamicElement - the dynamic portion of the full capability name. Cannot be null or emptypublic org.jboss.msc.service.ServiceName getCapabilityServiceName(Class serviceType)
serviceType - the expected type of the service's value. Cannot be nullnullIllegalArgumentException - if serviceType is null or
the capability does not provide a service of type serviceTypepublic T getRuntimeAPI()
null if the capability exposes no API to other capabilitiesCopyright © 2015 JBoss by Red Hat. All rights reserved.