
de.matrixweb.smaller.lessjs.Activator Maven / Gradle / Ivy
package de.matrixweb.smaller.lessjs;
import java.util.Properties;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import de.matrixweb.smaller.resource.Processor;
/**
* @author markusw
*/
public class Activator implements BundleActivator {
private ServiceRegistration registration;
/**
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(final BundleContext context) {
final Properties props = new Properties();
props.setProperty("name", "lessjs");
this.registration = context.registerService(Processor.class.getName(),
new LessjsProcessor(), props);
}
/**
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(final BundleContext context) {
if (this.registration != null) {
this.registration.unregister();
this.registration = null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy