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
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
Modifier and TypeMethodDescriptionvoid
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 Details
-
addService
void addService(ServiceDescriptor<S, SCTX> aServiceDescriptor) throws DuplicateServiceRuntimeExceptionRegisters 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 UnknownServiceRuntimeExceptionUnregisters a service to the service bus.- Parameters:
aServiceDescriptor
- the service descriptor- Throws:
UnknownServiceRuntimeException
- in case the service is not known.
-