-
public interface Services
Facility to query service addresses. Instances of this interface should be acquired fromLookup.Provider.getLookup()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<ComponentAddress>
locate(Class<? extends Service> service)
Locate the primary implementation of the requested service, if available.Stream<ComponentAddress>
locateAll(Class<? extends Service> service)
Locate all the available implementations of the requested service, if available.
-
-
-
Method Detail
-
locate
Optional<ComponentAddress> locate(Class<? extends Service> service)
Locate the primary implementation of the requested service, if available.- Parameters:
service
- class of service to locate- Returns:
- optional of service address
-
locateAll
Stream<ComponentAddress> locateAll(Class<? extends Service> service)
Locate all the available implementations of the requested service, if available. The primary implementation will be the first implementation in the stream.- Parameters:
service
- class of service to locate- Returns:
- stream of addresses, or empty stream
-
-