Activator.java :  » OSGi » osgi-in-action » org » foo » http » tracker » Java Open Source

Java Open Source » OSGi » osgi in action 
osgi in action » org » foo » http » tracker » Activator.java
package org.foo.http.tracker;


import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class Activator implements BundleActivator {

  private volatile HttpServiceTracker httpService;

  public void start(BundleContext ctx) throws Exception {
    httpService = new HttpServiceTracker(ctx);
    httpService.open();
  }

  public void stop(BundleContext ctx) throws Exception {
    httpService.close();
    httpService = null;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.