public interface ImmutableCapabilityRegistry
CapabilityRegistry
Capability registry contains two kinds of capabilities:
- possible capabilities which are defined on each resource to provide what said resource and provide at runtime
- runtime or actual capabilities which are runtime instances of possible capabilities| Modifier and Type | Method and Description |
|---|---|
Set<CapabilityRegistration> |
getCapabilities()
Returns set of runtime capabilities registered in the registry
|
<T> T |
getCapabilityRuntimeAPI(String capabilityName,
CapabilityScope scope,
Class<T> apiType)
Gets the runtime API associated with a given capability, if there is one.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String capabilityName,
CapabilityScope scope,
Class<?> serviceType)
Gets the name of the service provided by the capability, if there is one.
|
Set<CapabilityRegistration> |
getPossibleCapabilities()
Returns set of possible capabilities with there registration points registered in the registry
|
Set<PathAddress> |
getPossibleProviderPoints(CapabilityId capabilityId)
Returns possible provider points for passed capabilityId
|
boolean |
hasCapability(String capabilityName,
CapabilityScope scope)
Gets whether a runtime capability with the given name is registered.
|
boolean hasCapability(String capabilityName, CapabilityScope scope)
capabilityName - the name of the capability. Cannot be nullscope - the scope in which to check for the capabilitytrue if there is a capability with the given name registered<T> T getCapabilityRuntimeAPI(String capabilityName, CapabilityScope scope, Class<T> apiType)
T - the java type that exposes the APIcapabilityName - the name of the capability. Cannot be nullscope - the scope in which to resolve the capability. Cannot be nullapiType - class of the java type that exposes the API. Cannot be nullnullIllegalArgumentException - if the capability does not provide a runtime APIClassCastException - if the runtime API exposed by the capability cannot be cast to type {code T}Set<CapabilityRegistration> getCapabilities()
Set with all runtime capabilities and where ware they registeredSet<CapabilityRegistration> getPossibleCapabilities()
Set with all possible capabilities and where ware they registeredorg.jboss.msc.service.ServiceName getCapabilityServiceName(String capabilityName, CapabilityScope scope, Class<?> serviceType)
capabilityName - the name of the capability. Cannot be nullscope - the scope in which to resolve the capability. Cannot be nullserviceType - the type of the value provided by the service. May be null if the caller is
unconcerned about checking that its understanding of the service type provided by the
capability is correctnullIllegalStateException - if no capability with the given name is available in the given contextIllegalArgumentException - if the capability does not provide a service, or if serviceType
is not null and the type of the service the capability provides is not assignable from itSet<PathAddress> getPossibleProviderPoints(CapabilityId capabilityId)
capabilityId - id of capabilitynull but can be emptyCopyright © 2016 JBoss by Red Hat. All rights reserved.