Search in sources :

Example 1 with Deactivate

use of aQute.bnd.annotation.component.Deactivate in project predix-machine-template-adapter-edison by PredixDev.

the class IntelBoardSubscriptionMachineAdapter method deactivate.

/**
	 * OSGi component lifecycle deactivation method
	 * 
	 * @param ctx
	 *            component context
	 */
@Deactivate
public void deactivate(ComponentContext ctx) {
    // Put your clean up code here when container is shutting down
    if (_logger.isDebugEnabled()) {
        //$NON-NLS-1$
        _logger.debug("Stopped sample for " + ctx.getBundleContext().getBundle().getSymbolicName());
    }
    Collection<WorkshopDataSubscription> values = this.dataSubscriptions.values();
    // Stop random data generation thread.
    for (WorkshopDataSubscription sub : values) {
        sub.stop();
    }
    this.adapterState = MachineAdapterState.Stopped;
}
Also used : WorkshopDataSubscription(com.ge.predix.solsvc.workshop.types.WorkshopDataSubscription) Deactivate(aQute.bnd.annotation.component.Deactivate)

Aggregations

Deactivate (aQute.bnd.annotation.component.Deactivate)1 WorkshopDataSubscription (com.ge.predix.solsvc.workshop.types.WorkshopDataSubscription)1