public final class LocalRegistryAndDiscoveryProvider extends Object implements RegistryProvider, DiscoveryProvider
EMPTYEMPTY| Constructor and Description |
|---|
LocalRegistryAndDiscoveryProvider() |
| Modifier and Type | Method and Description |
|---|---|
DiscoveryRequest |
discover(ServiceType serviceType,
FilterSpec filterSpec,
DiscoveryResult result)
Attempt to discover implementations of a service.
|
ServiceRegistration |
registerService(ServiceURL serviceURL)
Register a service with this provider.
|
ServiceRegistration |
registerServices(ServiceURL... serviceURLs)
Register multiple services with this provider at once.
|
public ServiceRegistration registerService(ServiceURL serviceURL)
RegistryProviderregisterService in interface RegistryProviderserviceURL - the service to register (not null)null)public ServiceRegistration registerServices(ServiceURL... serviceURLs)
RegistryProvider
The default implementation calls RegistryProvider.registerService(ServiceURL) for each service in the array and
returns an aggregated handle.
registerServices in interface RegistryProviderserviceURLs - the services to register (not null, will not contain null elements)null)public DiscoveryRequest discover(ServiceType serviceType, FilterSpec filterSpec, DiscoveryResult result)
DiscoveryProviderDiscoveryResult.addMatch(ServiceURL) method on the result parameter as they are found. The
DiscoveryResult.complete() method must be called when the discovery process is complete or has timed out
or failed for any other reason, otherwise discovery clients may hang indefinitely.
The discovery process should be asynchronous if possible. In this case, this method should return as soon as possible in order to unblock the calling thread quickly and allow other discovery mechanisms to proceed. The discovery process will not be considered complete until the result's completion method is called, even if such a call comes from a different thread.
discover in interface DiscoveryProviderserviceType - the service type to matchfilterSpec - the service attribute filter expression, or null to return all matchesresult - the discovery resultCopyright © 2017 JBoss by Red Hat. All rights reserved.