Package org.wildfly.discovery.impl
Class MutableRegistryProvider
java.lang.Object
org.wildfly.discovery.impl.MutableRegistryProvider
- All Implemented Interfaces:
RegistryProvider
A service registry provider which can be mutated at run time to delegate to a new provider.
- Author:
- David M. Lloyd
-
Field Summary
Fields inherited from interface org.wildfly.discovery.spi.RegistryProvider
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance using an empty provider.MutableRegistryProvider(RegistryProvider initialProvider) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionregisterService(ServiceURL serviceURL) Register a service with this provider.registerServices(ServiceURL... serviceURLs) Register multiple services with this provider at once.voidsetRegistryProvider(RegistryProvider delegateProvider) Set the registry provider instance.
-
Constructor Details
-
MutableRegistryProvider
Construct a new instance.- Parameters:
initialProvider- the initial provider to use (must not benull)
-
MutableRegistryProvider
public MutableRegistryProvider()Construct a new instance using an empty provider.
-
-
Method Details
-
registerService
Description copied from interface:RegistryProviderRegister a service with this provider. Service URLs which are unsupported must be ignored; in this case, the empty registration handle must be returned.- Specified by:
registerServicein interfaceRegistryProvider- Parameters:
serviceURL- the service to register (notnull)- Returns:
- the service registration handle (must not be
null)
-
registerServices
Description copied from interface:RegistryProviderRegister multiple services with this provider at once. Service URLs which are unsupported must be ignored. If none of the service URLs are supported, then the empty registration handle must be returned.The default implementation calls
RegistryProvider.registerService(ServiceURL)for each service in the array and returns an aggregated handle.- Specified by:
registerServicesin interfaceRegistryProvider- Parameters:
serviceURLs- the services to register (notnull, will not containnullelements)- Returns:
- the service registration handle (must not be
null)
-
setRegistryProvider
Set the registry provider instance.- Parameters:
delegateProvider- the registry provider instance (must not benull)
-