This annotation can be used to be notified when a component is unregistered from the registry.
At this point, the component has been unregistered from the OSGI registry (if it provides some services).
The method must not take any parameters.
Usage Examples
@Component
class X implements Z {
@Stop
void stop(ServiceRegistration sr) {
// Our service must stop because it is about to be unregistered from the registry.
}
@Unregistered
void unregistered() {
// At this point, our service has been unregistered from the OSGi registry
}
}