public class LocalServiceProviderRegistry<T> extends Object implements ServiceProviderRegistry<T>
ServiceProviderRegistrationFactory
implementation.Constructor and Description |
---|
LocalServiceProviderRegistry(Group group) |
Modifier and Type | Method and Description |
---|---|
Group |
getGroup()
Returns the group with which to register service providers.
|
Set<Node> |
getProviders(T service)
Returns the set of nodes that can provide the specified service.
|
Set<T> |
getServices()
Returns the complete list of services known to this registry.
|
ServiceProviderRegistration<T> |
register(T service)
Registers the local node as providing the specified service.
|
ServiceProviderRegistration<T> |
register(T service,
ServiceProviderRegistration.Listener listener)
Registers the local node as providing the specified service, using the specified listener.
|
public LocalServiceProviderRegistry(Group group)
public Group getGroup()
ServiceProviderRegistry
getGroup
in interface ServiceProviderRegistry<T>
public ServiceProviderRegistration<T> register(T service)
ServiceProviderRegistry
register
in interface ServiceProviderRegistry<T>
service
- a service to registerpublic ServiceProviderRegistration<T> register(T service, ServiceProviderRegistration.Listener listener)
ServiceProviderRegistry
register
in interface ServiceProviderRegistry<T>
service
- a service to registerlistener
- a registry listenerpublic Set<Node> getProviders(T service)
ServiceProviderRegistry
getProviders
in interface ServiceProviderRegistry<T>
service
- a service to obtain providers forpublic Set<T> getServices()
ServiceProviderRegistry
getServices
in interface ServiceProviderRegistry<T>
Copyright © 2017 JBoss by Red Hat. All rights reserved.