public class DelegatingRuntimeCapabilityRegistry extends Object implements RuntimeCapabilityRegistry
RuntimeCapabilityRegistry implementation that simply delegates to another
RuntimeCapabilityRegistry. Intended as a convenience class to allow overriding
of standard behaviors and also as a means to support a copy-on-write/publish-on-commit
semantic for the management resource tree.| Modifier and Type | Class and Description |
|---|---|
static interface |
DelegatingRuntimeCapabilityRegistry.CapabilityRegistryDelegateProvider
Provides a delegate for use by a
DelegatingCapabilityRegistry. |
| Constructor and Description |
|---|
DelegatingRuntimeCapabilityRegistry(DelegatingRuntimeCapabilityRegistry.CapabilityRegistryDelegateProvider delegateProvider)
Creates a new DelegatingResource with a possibly changing delegate.
|
DelegatingRuntimeCapabilityRegistry(RuntimeCapabilityRegistry delegate)
Creates a new DelegatingCapabilityRegistry with a fixed delegate.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getCapabilityRuntimeAPI(String capabilityName,
CapabilityContext context,
Class<T> apiType)
Gets the runtime API associated with a given capability, if there is one.
|
org.jboss.msc.service.ServiceName |
getCapabilityServiceName(String capabilityName,
CapabilityContext context,
Class<?> serviceType) |
boolean |
hasCapability(String capabilityName,
CapabilityContext context)
Gets whether a capability with the given name is registered.
|
void |
registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration)
Registers an additional requirement a capability has beyond what it was aware of when
capability
was passed to CapabilityRegistry.registerCapability(CapabilityRegistration). |
void |
registerCapability(RuntimeCapabilityRegistration capability)
Registers a capability with the system.
|
RuntimeCapabilityRegistration |
removeCapability(String capability,
CapabilityContext context,
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.
|
public DelegatingRuntimeCapabilityRegistry(RuntimeCapabilityRegistry delegate)
delegate - the delegate. Cannot be nullpublic DelegatingRuntimeCapabilityRegistry(DelegatingRuntimeCapabilityRegistry.CapabilityRegistryDelegateProvider delegateProvider)
delegateProvider - provider of the delegate. Cannot be nullpublic void registerCapability(RuntimeCapabilityRegistration capability)
CapabilityRegistryrequirements
associated with the capability will be recorded as requirements.registerCapability in interface CapabilityRegistry<RuntimeCapabilityRegistration,RuntimeRequirementRegistration>capability - the capability. Cannot be nullpublic void registerAdditionalCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration)
CapabilityRegistrycapability
was passed to CapabilityRegistry.registerCapability(CapabilityRegistration). 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 CapabilityRegistry<RuntimeCapabilityRegistration,RuntimeRequirementRegistration>requirementRegistration - the requirementpublic void removeCapabilityRequirement(RuntimeRequirementRegistration requirementRegistration)
CapabilityRegistryremoveCapabilityRequirement in interface CapabilityRegistry<RuntimeCapabilityRegistration,RuntimeRequirementRegistration>requirementRegistration - the requirement. Cannot be nullCapabilityRegistry.registerAdditionalCapabilityRequirement(org.jboss.as.controller.capability.registry.RequirementRegistration)public RuntimeCapabilityRegistration removeCapability(String capability, CapabilityContext context, PathAddress registrationPoint)
CapabilityRegistryremoveCapability in interface CapabilityRegistry<RuntimeCapabilityRegistration,RuntimeRequirementRegistration>capability - the name of the capability. Cannot be nullcontext - 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 boolean hasCapability(String capabilityName, CapabilityContext context)
CapabilityRegistryhasCapability in interface CapabilityRegistry<RuntimeCapabilityRegistration,RuntimeRequirementRegistration>capabilityName - the name of the capability. Cannot be nullcontext - the context in which to check for the capabilitytrue if there is a capability with the given name registeredpublic <T> T getCapabilityRuntimeAPI(String capabilityName, CapabilityContext context, Class<T> apiType)
RuntimeCapabilityRegistrygetCapabilityRuntimeAPI in interface RuntimeCapabilityRegistryT - the java type that exposes the APIcapabilityName - the name of the capability. Cannot be nullcontext - the context in which to resolve the capability. Cannot be nullapiType - class of the java type that exposes the API. Cannot be nullnullpublic org.jboss.msc.service.ServiceName getCapabilityServiceName(String capabilityName, CapabilityContext context, Class<?> serviceType)
getCapabilityServiceName in interface RuntimeCapabilityRegistryCopyright © 2015 JBoss by Red Hat. All rights reserved.