Activator.java 1.05 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.osgi.framework.BundleActivator
 *  org.osgi.framework.BundleContext
 *  org.osgi.framework.ServiceRegistration
 */
package com.adobe.cq.deserfw.impl;

import com.adobe.cq.deserfw.impl.attach.IBMAttachAPIResolver;
import com.adobe.cq.deserfw.impl.attach.SunAttachAPIResolver;
import java.util.ArrayList;
import java.util.List;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;

public class Activator
implements BundleActivator {
    private List<ServiceRegistration> toCleanup = new ArrayList<ServiceRegistration>();

    public void start(BundleContext context) throws Exception {
        this.toCleanup.add(SunAttachAPIResolver.registerService(context));
        this.toCleanup.add(IBMAttachAPIResolver.registerService(context));
    }

    public void stop(BundleContext context) throws Exception {
        for (ServiceRegistration reg : this.toCleanup) {
            reg.unregister();
        }
    }
}