Package org.wildfly.discovery.impl
Class AggregateRegistryProvider
java.lang.Object
org.wildfly.discovery.impl.AggregateRegistryProvider
- All Implemented Interfaces:
RegistryProvider
A registry provider which aggregates multiple other providers together.
- Author:
- David M. Lloyd
-
Field Summary
Fields inherited from interface org.wildfly.discovery.spi.RegistryProvider
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionAggregateRegistryProvider(RegistryProvider[] delegates) 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.
-
Constructor Details
-
AggregateRegistryProvider
Construct a new instance.- Parameters:
delegates- the array of delegates (must not benull)
-
-
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)
-