public final class CapabilityRegistry extends Object implements ImmutableCapabilityRegistry, PossibleCapabilityRegistry, RuntimeCapabilityRegistry
capabilities available in the system.| Constructor and Description |
|---|
CapabilityRegistry(boolean forServer) |
| 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
|
boolean |
hasCapability(String capabilityName,
CapabilityScope scope)
Gets whether a runtime capability with the given name is registered.
|
void |
registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)
Registers an additional requirement a capability has beyond what it was aware of when
capability
was passed to registerCapability(RuntimeCapabilityRegistration). |
void |
registerCapability(RuntimeCapabilityRegistration capabilityRegistration)
Registers a capability with the system.
|
void |
registerPossibleCapability(Capability capability,
PathAddress registrationPoint)
Registers a capability with the system.
|
RuntimeCapabilityRegistration |
removeCapability(String capabilityName,
CapabilityScope scope,
PathAddress registrationPoint)
Remove a previously registered capability if all registration points for it have been removed.
|
void |
removeCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration)
Remove a previously registered requirement for a capability.
|
CapabilityRegistration |
removePossibleCapability(Capability capability,
PathAddress registrationPoint)
Remove a previously registered capability if all registration points for it have been removed.
|
public void registerCapability(RuntimeCapabilityRegistration capabilityRegistration)
requirements
associated with the capability will be recorded as requirements.registerCapability in interface RuntimeCapabilityRegistrycapabilityRegistration - the capability. Cannot be nullpublic void registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirement)
capability
was passed to registerCapability(RuntimeCapabilityRegistration). Used for cases
where a capability optionally depends on another capability, and whether or not that requirement is needed is
not known when the capability is first registered.registerAdditionalCapabilityRequirement in interface RuntimeCapabilityRegistryrequirement - the requirementIllegalArgumentException - if no matching capability is currently
registered for either required or dependentpublic void removeCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration)
removeCapabilityRequirement in interface RuntimeCapabilityRegistryrequirementRegistration - the requirement. Cannot be nullregisterAdditionalCapabilityRequirement(org.jboss.as.controller.capability.registry.RuntimeRequirementRegistration)public RuntimeCapabilityRegistration removeCapability(String capabilityName, CapabilityScope scope, PathAddress registrationPoint)
removeCapability in interface RuntimeCapabilityRegistrycapabilityName - the name of the capability. Cannot be nullscope - the context in which the capability is registered. Cannot be nullregistrationPoint - the specific registration point that is being removednull if no matching capability was registered or other
registration points for the capability still existpublic void registerPossibleCapability(Capability capability, PathAddress registrationPoint)
requirements
associated with the capability will be recorded as requirements.registerPossibleCapability in interface PossibleCapabilityRegistrycapability - the capability. Cannot be nullpublic CapabilityRegistration removePossibleCapability(Capability capability, PathAddress registrationPoint)
removePossibleCapability in interface PossibleCapabilityRegistrycapability - the capability. Cannot be nullregistrationPoint - the specific registration point that is being removednull if no matching capability was registered or other
registration points for the capability still existpublic boolean hasCapability(String capabilityName, CapabilityScope scope)
ImmutableCapabilityRegistryhasCapability in interface ImmutableCapabilityRegistrycapabilityName - 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 registeredpublic <T> T getCapabilityRuntimeAPI(String capabilityName, CapabilityScope scope, Class<T> apiType)
ImmutableCapabilityRegistrygetCapabilityRuntimeAPI in interface ImmutableCapabilityRegistryT - 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 nullnullpublic Set<CapabilityRegistration> getCapabilities()
ImmutableCapabilityRegistrygetCapabilities in interface ImmutableCapabilityRegistrySet with all runtime capabilities and where ware they registeredpublic Set<CapabilityRegistration> getPossibleCapabilities()
ImmutableCapabilityRegistrygetPossibleCapabilities in interface ImmutableCapabilityRegistrySet with all possible capabilities and where ware they registeredpublic org.jboss.msc.service.ServiceName getCapabilityServiceName(String capabilityName, CapabilityScope scope, Class<?> serviceType)
ImmutableCapabilityRegistrygetCapabilityServiceName in interface ImmutableCapabilityRegistrycapabilityName - 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 correctnullCopyright © 2015 JBoss by Red Hat. All rights reserved.