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)
Deprecated.
use
fromBaseCapability(String) on base |
RuntimeCapability<T> |
fromBaseCapability(String dynamicElement)
Creates a fully named capability from a
dynamically named base
capability. |
org.jboss.msc.service.ServiceName |
getCapabilityServiceName()
Gets the name of the service provided by this capability, if there is one.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(Class<?> serviceValueType)
Gets the name of service provided by this capability.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String dynamicNameElement)
Gets the name of the service provided by this capability, if there is one.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String dynamicNameElement,
Class<?> serviceValueType)
Gets the name of service provided by this capability.
|
Class<?> |
getCapabilityServiceValueType()
Gets the valid type to pass to
getCapabilityServiceName(Class). |
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 nullnull@Deprecated public static <T> RuntimeCapability<T> fromBaseCapability(RuntimeCapability<T> base, String dynamicElement)
fromBaseCapability(String) on basedynamically 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()
nullIllegalArgumentException - if the capability does not provide a servicepublic org.jboss.msc.service.ServiceName getCapabilityServiceName(Class<?> serviceValueType)
serviceValueType - the expected type of the service's value. Only used to provide validate that
the service value type provided by the capability matches the caller's
expectation. May be null in which case no validation is performednullIllegalArgumentException - if the capability does not provide a service or if its value type
is not assignable to serviceValueTypepublic org.jboss.msc.service.ServiceName getCapabilityServiceName(String dynamicNameElement)
dynamically named capabilities.dynamicNameElement - the dynamic portion of the capability name. Cannot be nullnullIllegalArgumentException - if the capability does not provide a serviceAssertionError - if AbstractCapability.isDynamicallyNamed() does not return truepublic org.jboss.msc.service.ServiceName getCapabilityServiceName(String dynamicNameElement, Class<?> serviceValueType)
dynamicNameElement - the dynamic portion of the capability name. Cannot be nullserviceValueType - the expected type of the service's value. Only used to provide validate that
the service value type provided by the capability matches the caller's
expectation. May be null in which case no validation is performednullIllegalArgumentException - if the capability does not provide a service or if its value type
is not assignable to serviceValueTypeIllegalStateException - if AbstractCapability.isDynamicallyNamed() does not return truepublic Class<?> getCapabilityServiceValueType()
getCapabilityServiceName(Class).null if this capability does not provide a
servicepublic T getRuntimeAPI()
null if the capability exposes no API to other capabilitiespublic RuntimeCapability<T> fromBaseCapability(String dynamicElement)
dynamically named base
capability. Capability providers should use this method to generate fully named capabilities in logic
that handles dynamically named resources.dynamicElement - the dynamic portion of the full capability name. Cannot be null or emptyAssertionError - if AbstractCapability.isDynamicallyNamed() returns falseCopyright © 2015 JBoss by Red Hat. All rights reserved.