public interface ScopedRegistry
Service registry of a specific scope.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Activate this registry instance.<T> Activator
<T> activator
(ServiceInfo descriptor, Supplier<Activator<T>> activatorSupplier) Provides either an existing activator, if one is already available in this scope, or adds a new activator instance.void
Deactivate this registry instance.
-
Method Details
-
activate
void activate()Activate this registry instance. This method will prepare this registry for use. -
deactivate
void deactivate()Deactivate this registry instance. This method will deactivate all active instances- Throws:
ServiceRegistryException
- in case one or more services failed to deactivate
-
activator
Provides either an existing activator, if one is already available in this scope, or adds a new activator instance.- Type Parameters:
T
- type of the instances supported by the descriptor- Parameters:
descriptor
- service descriptoractivatorSupplier
- supplier of new activators to manage service instances- Returns:
- activator for the service, either an existing one, or a new one created from the supplier
-