Package org.knopflerfish.bundle.bar

Source Code of org.knopflerfish.bundle.bar.Activator

package org.knopflerfish.bundle.bar;

import org.knopflerfish.service.foo.FooService;

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

public class Activator implements BundleActivator, FooService{

  public void foo() {
    System.out.println("bar: Doing foo");
  }

  public void start(BundleContext context)
    throws Exception
  {
    final ServiceRegistration registration
      = context.registerService(FooService.class.getName(), this, null);

    System.out.println("bar: Registered " + registration);
  }

  public void stop(BundleContext context) throws Exception {
    //unregister will be done automagically
  }
}
TOP

Related Classes of org.knopflerfish.bundle.bar.Activator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.