Java Code Examples for org.osgi.framework.BundleContext#removeServiceListener()

The following examples show how to use org.osgi.framework.BundleContext#removeServiceListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Activator.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public void stop ( final BundleContext context ) throws Exception
{
    context.removeServiceListener ( this.listener );

    this.itemTracker.close ();
    this.poolTracker.close ();

    this.handle.unregister ();
    this.handle = null;

    this.service.stop ();
    this.service = null;

    this.executor.shutdown ();
}
 
Example 2
Source File: EventAdminActivator.java    From concierge with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 
 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
 */
public void stop(BundleContext context) throws Exception {
	context.removeBundleListener(eventAdmin);
	context.removeServiceListener(eventAdmin);
	context.removeFrameworkListener(eventAdmin);
	eventAdmin.running = false;
	EventAdminActivator.context = null;
}
 
Example 3
Source File: Activator.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void stop(BundleContext context) throws Exception {
    stc.close();
    context.removeServiceListener(srcc);
    context.removeBundleListener(bstc);
}