Created
February 3, 2014 14:04
-
-
Save hstaudacher/8784384 to your computer and use it in GitHub Desktop.
OSGi-JAX-RS Connector Activator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package osgi.rest.example; | |
import org.osgi.framework.BundleActivator; | |
import org.osgi.framework.BundleContext; | |
import org.osgi.framework.ServiceRegistration; | |
public class Activator implements BundleActivator { | |
private ServiceRegistration<ExampleResource> registration; | |
public void start(BundleContext bundleContext) throws Exception { | |
registration = bundleContext.registerService(ExampleResource.class, new ExampleResource(), null); | |
} | |
public void stop(BundleContext bundleContext) throws Exception { | |
registration.unregister(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment