Interface ServiceProviderRegistrar<T,M extends GroupMember>
- Type Parameters:
T- the service typeM- the member type
- All Superinterfaces:
Registrar<T>
A distributed registry of service providers.
Allows a client to query the group members that can provide a given service.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiongetGroup()Returns the group with which to register service providers.getProviders(T service) Returns the set of group members that can provide the specified service.Returns the complete list of services known to this registry.Registers the local group member as a provider of the specified service.register(T service, ServiceProviderListener<M> listener) Registers the local group member as a provider of the specified service, using the specified listener.
-
Method Details
-
getGroup
Returns the group with which to register service providers.- Returns:
- a group
-
register
Registers the local group member as a provider of the specified service. -
register
Registers the local group member as a provider of the specified service, using the specified listener.- Parameters:
service- a service to registerlistener- a registry listener- Returns:
- a new service provider registration
-
getProviders
Returns the set of group members that can provide the specified service.- Parameters:
service- a service for which to obtain providers- Returns:
- a set of group members providing the specified service
-
getServices
Returns the complete list of services known to this registry.- Returns:
- a set of services
-