Module org.refcodes.servicebus
Package org.refcodes.servicebus
Interface ServiceDirectory<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 Superinterfaces:
ServiceLookup<S,SCTX>
- All Known Implementing Classes:
ServiceDirectoryImpl
public interface ServiceDirectory<S extends Service<?>,SCTX> extends ServiceLookup<S,SCTX>
The service descriptor manager can be used to manage services and them configurations, i.e a system administering services in an my have access to a service descriptor manager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addService(ServiceDescriptor<S,SCTX> aServiceDescriptor)
Registers a service to the service bus.void
removeService(ServiceDescriptor<S,SCTX> aServiceDescriptor)
Unregisters a service to the service bus.-
Methods inherited from interface org.refcodes.servicebus.ServiceLookup
getServiceDescriptors, hasService
-
-
-
-
Method Detail
-
addService
void addService(ServiceDescriptor<S,SCTX> aServiceDescriptor) throws DuplicateServiceRuntimeException
Registers a service to the service bus.- Parameters:
aServiceDescriptor
- the service descriptor- Throws:
DuplicateServiceRuntimeException
- in case the service cannot be identified unambiguously by a matcher. A matcher declaration must be possible to identify the given service unambiguously. The service as being described by the service type and the service Meta-Data is already registered to the service bus.
-
removeService
void removeService(ServiceDescriptor<S,SCTX> aServiceDescriptor) throws UnknownServiceRuntimeException
Unregisters a service to the service bus.- Parameters:
aServiceDescriptor
- the service descriptor- Throws:
UnknownServiceRuntimeException
- in case the service is not known.
-
-