Package org.refcodes.servicebus
Interface ServiceLookup<S extends Service<?>,SCTX>
-
- Type Parameters:
S
- The type to be used for theService
.SCTX
- The type to be used for theService
's context.
- All Known Subinterfaces:
ServiceDirectory<S,SCTX>
- All Known Implementing Classes:
ServiceDirectoryImpl
,ServiceLookupImpl
public interface ServiceLookup<S extends Service<?>,SCTX>
The interface may be used internally by a system managing services. Having access to an object providing this interface such a system can "work" with the services and them configurations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<ServiceDescriptor<S,SCTX>>
getServiceDescriptors()
Returns a collection containing theServiceDescriptor
instances known by theServiceLookup
.boolean
hasService(ServiceDescriptor<S,SCTX> aServiceDescriptor)
Determines whether the given service is known by the service bus by taking the service type and the service Meta-Data as criteria, not the service identity.
-
-
-
Method Detail
-
getServiceDescriptors
java.util.Set<ServiceDescriptor<S,SCTX>> getServiceDescriptors()
Returns a collection containing theServiceDescriptor
instances known by theServiceLookup
.- Returns:
- A collection containing the
ServiceDescriptor
instances known by theServiceLookup
.
-
hasService
boolean hasService(ServiceDescriptor<S,SCTX> aServiceDescriptor)
Determines whether the given service is known by the service bus by taking the service type and the service Meta-Data as criteria, not the service identity. I.e. there must not be the same service twice on the service bus which can not be distinguished by its type and its Meta-Data (i.e. a matcher must be able to distinguish two services from each other).- Parameters:
aServiceDescriptor
- the service descriptor- Returns:
- True in case the given service is known by the service bus.
-
-