Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
OSGi bridge for hybrid Java EE app
import java.util.Collection;
import java.util.Properties;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleListener;
import org.osgi.framework.ServiceListener;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
public interface OSGiBridge {
boolean registerBundleListener(BundleListener listener);
boolean registerServiceListener(ServiceListener listener);
<C, S extends C> ServiceRegistration registerService(
Class<C>[] contracts, S service, Properties properties);
<C, S extends C> ServiceRegistration registerService(
Class<C> contract, S service, Properties properties);
ServiceReference getServiceReference(Class<?> contract);
Collection<ServiceReference> getServiceReferences(Class<?> contract, String filter);
Object getService(ServiceReference ref);
void ungetService(ServiceReference ref);
Collection<Bundle> getBundles();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment