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. |
| 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 String |
buildDynamicCapabilityName(String baseName,
String dynamicNameElement) |
RuntimeCapability<T> |
fromBaseCapability(PathAddress path)
Creates a fully named capability from a
dynamically named base
capability. |
RuntimeCapability<T> |
fromBaseCapability(String... dynamicElement)
Creates a fully named capability from a
dynamically named base
capability. |
RuntimeCapability<T> |
fromBaseCapability(String dynamicElement) |
Set<String> |
getAdditionalRequiredPackages()
Gets the names of any "additional" Galleon packages that must be installed in order
for this capability to function.
|
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(Class<?> serviceValueType,
String... dynamicNameElements) |
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(PathAddress address)
Gets the name of the service provided by this capability, if there is one.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(PathAddress address,
Class<?> serviceValueType)
Gets the name of service provided by this capability.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String... dynamicNameElements)
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.
|
boolean |
isAllowMultipleRegistrations()
Gets whether this capability can be registered at more than one point within the same
overall scope.
|
equals, getDynamicName, getDynamicName, getDynamicOptionalRequirements, getDynamicRequirements, getName, getOptionalRequirements, getRequirements, getRuntimeOnlyRequirements, hashCode, isDynamicallyNamed, toStringpublic static String buildDynamicCapabilityName(String baseName, String dynamicNameElement)
public RuntimeCapability<T> fromBaseCapability(String dynamicElement)
public static String buildDynamicCapabilityName(String baseName, String... dynamicNameElement)
baseName - the base name. Cannot be nulldynamicNameElement - the dynamic portion of the name. Cannot be nullnullpublic 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... dynamicNameElements)
dynamically named capabilities.dynamicNameElements - 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(PathAddress address)
dynamically named capabilities.address - Path address for which service name is calculated from 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 org.jboss.msc.service.ServiceName getCapabilityServiceName(Class<?> serviceValueType, String... dynamicNameElements)
public org.jboss.msc.service.ServiceName getCapabilityServiceName(PathAddress address, Class<?> serviceValueType)
address - the path from which dynamic portion of the capability name is calculated from. 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 boolean isAllowMultipleRegistrations()
true if the capability can legally be registered in more than one location in the same scope;
false if an attempt to do this should result in an exceptionpublic 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 falsepublic RuntimeCapability<T> fromBaseCapability(PathAddress path)
dynamically named base
capability. Capability providers should use this method to generate fully named capabilities in logic
that handles dynamically named resources.path - the dynamic portion of the full capability name. Cannot be null or emptyAssertionError - if AbstractCapability.isDynamicallyNamed() returns falsepublic Set<String> getAdditionalRequiredPackages()
CapabilityA package is "additional" if it is not one of the "standard" packages that must be installed. The names of "standard" packages should not be returned. The "standard" packages are:
Extension, the package
that installs the module that provides the extension.
requirement.
null but may be emptyCopyright © 2018 JBoss by Red Hat. All rights reserved.