public interface CapabilityServiceSupport
Note that use of this interface in no way creates a requirement on the referenced capability by the caller.
| Modifier and Type | Interface and Description |
|---|---|
static class |
CapabilityServiceSupport.NoSuchCapabilityException
Exception thrown when support for an unregistered capability is requested.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getCapabilityRuntimeAPI(String capabilityName,
Class<T> apiType)
Gets the runtime API associated with a given capability, if there is one.
|
<T> T |
getCapabilityRuntimeAPI(String capabilityBaseName,
String dynamicPart,
Class<T> apiType)
Gets the runtime API associated with a given
dynamically named
capability, if there is one. |
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String capabilityName)
Gets the name of a service associated with a given capability.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String capabilityBaseName,
String... dynamicParts)
Gets the name of a service associated with a given
dynamically named
capability. |
boolean |
hasCapability(String capabilityName)
Gets whether a runtime capability with the given name is registered.
|
boolean hasCapability(String capabilityName)
capabilityName - the name of the capability. Cannot be nulltrue if there is a capability with the given name registered<T> T getCapabilityRuntimeAPI(String capabilityName, Class<T> apiType) throws CapabilityServiceSupport.NoSuchCapabilityException
T - the java type that exposes the APIcapabilityName - the name of the capability. Cannot be nullapiType - class of the java type that exposes the API. Cannot be nullnullCapabilityServiceSupport.NoSuchCapabilityException - if no matching capability is registeredIllegalArgumentException - if the capability does not provide a runtime APIClassCastException - if the runtime API exposed by the capability cannot be cast to type {code T}<T> T getCapabilityRuntimeAPI(String capabilityBaseName, String dynamicPart, Class<T> apiType) throws CapabilityServiceSupport.NoSuchCapabilityException
dynamically named
capability, if there is one.T - the java type that exposes the APIcapabilityBaseName - the base name of the capability. Cannot be nulldynamicPart - the dynamic part of the capability name. Cannot be nullapiType - class of the java type that exposes the API. Cannot be nullnullCapabilityServiceSupport.NoSuchCapabilityException - if no matching capability is registeredIllegalArgumentException - if the capability does not provide a runtime APIClassCastException - if the runtime API exposed by the capability cannot be cast to type {code T}org.jboss.msc.service.ServiceName getCapabilityServiceName(String capabilityName)
capabilityName - the name of the capability. Cannot be nullnullorg.jboss.msc.service.ServiceName getCapabilityServiceName(String capabilityBaseName, String... dynamicParts)
dynamically named
capability. This method does not confirm that the capability is currently registered.capabilityBaseName - the base name of the capability. Cannot be nulldynamicParts - the dynamic parts of the capability name. Cannot be null Can be multiple if capability supports thatnullCopyright © 2017 JBoss by Red Hat. All rights reserved.