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 dynamicPart)
Gets the name of a service associated with a given
dynamically named
capability. |
<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 null
apiType
- class of the java type that exposes the API. Cannot be null
null
CapabilityServiceSupport.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 null
dynamicPart
- the dynamic part of the capability name. Cannot be null
apiType
- class of the java type that exposes the API. Cannot be null
null
CapabilityServiceSupport.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 null
null
org.jboss.msc.service.ServiceName getCapabilityServiceName(String capabilityBaseName, String dynamicPart)
dynamically named
capability. This method does not confirm that the capability is currently registered.capabilityBaseName
- the base name of the capability. Cannot be null
dynamicPart
- the dynamic part of the capability name. Cannot be null
null
Copyright © 2023 JBoss by Red Hat. All rights reserved.