Package com.mycorp.examples.internal.timeservice.provider.rest.common

Source Code of com.mycorp.examples.internal.timeservice.provider.rest.common.Activator

package com.mycorp.examples.internal.timeservice.provider.rest.common;

import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.core.util.ExtensionRegistryRunnable;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

import com.mycorp.examples.timeservice.provider.rest.common.TimeServiceRestNamespace;

public class Activator implements BundleActivator {

  public void start(final BundleContext context) throws Exception {
    SafeRunner.run(new ExtensionRegistryRunnable(context) {
      @Override
      protected void runWithoutRegistry() throws Exception {
        context.registerService(Namespace.class, new TimeServiceRestNamespace(), null);
      }
    });
  }

  public void stop(BundleContext context) throws Exception {
    // nothing
  }

}
TOP

Related Classes of com.mycorp.examples.internal.timeservice.provider.rest.common.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.