use of io.fabric8.maven.MavenResolver in project fabric8 by jboss-fuse.
the class Activator method stop.
/**
* Performs cleanup:<br/>
* * Unregister handler;<br/>
* * Unregister managed service;<br/>
* * Release bundle context.
*
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(final BundleContext bundleContext) {
if (m_handlerReg != null) {
m_handlerReg.unregister();
m_handlerReg = null;
}
if (m_managedServiceReg != null) {
m_managedServiceReg.unregister();
m_managedServiceReg = null;
}
ServiceRegistration<MavenResolver> registration = m_resolverReg.getAndSet(null);
if (registration != null) {
registration.unregister();
}
MavenResolver resolver = m_resolver.getAndSet(null);
if (resolver != null) {
try {
resolver.close();
} catch (IOException e) {
// Ignore
}
}
m_bundleContext = null;
LOG.debug("Handler for protocols " + PROTOCOL + " stopped");
}
Aggregations