public class OSGiAdapter extends Object
Modifier and Type | Field and Description |
---|---|
protected BundleIdGenerator |
bundleIds |
protected ListenerList |
bundleListeners |
protected File |
dataDir |
protected ListenerList |
frameworkListeners |
protected File |
idTableFile |
protected Properties |
properties |
protected BundleRegistry |
registry |
protected ListenerList |
serviceListeners |
protected Map<String,org.osgi.framework.ServiceRegistration> |
services |
protected SystemBundle |
systemBundle |
protected File |
workingDir |
Constructor and Description |
---|
OSGiAdapter(File workingDir) |
OSGiAdapter(File workingDir,
File dataDir,
Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
addBundleListener(org.osgi.framework.BundleListener listener) |
void |
addFrameworkListener(org.osgi.framework.FrameworkListener listener) |
void |
addServiceListener(org.osgi.framework.ServiceListener listener) |
void |
addServiceListener(org.osgi.framework.ServiceListener listener,
String filter) |
void |
fireBundleEvent(org.osgi.framework.BundleEvent event) |
void |
fireFrameworkEvent(org.osgi.framework.FrameworkEvent event) |
void |
fireServiceEvent(org.osgi.framework.ServiceEvent event) |
BundleImpl |
getBundle(String symbolicName) |
long |
getBundleId(String symbolicName) |
File |
getDataDir() |
BundleImpl[] |
getInstalledBundles() |
String |
getProperty(String key) |
String |
getProperty(String key,
String defvalue) |
BundleRegistry |
getRegistry() |
org.osgi.framework.Bundle |
getSystemBundle() |
File |
getWorkingDir() |
protected void |
initialize(Properties properties) |
void |
install(BundleImpl bundle) |
void |
removeBundleListener(org.osgi.framework.BundleListener listener) |
void |
removeFrameworkListener(org.osgi.framework.FrameworkListener listener) |
void |
removeService(String clazz) |
void |
removeServiceListener(org.osgi.framework.ServiceListener listener) |
void |
setProperty(String name,
String value) |
void |
setSystemBundle(SystemBundle systemBundle) |
void |
shutdown() |
void |
uninstall(BundleImpl bundle) |
protected final File workingDir
protected File idTableFile
protected BundleIdGenerator bundleIds
protected ListenerList frameworkListeners
protected ListenerList bundleListeners
protected ListenerList serviceListeners
protected BundleRegistry registry
protected Properties properties
protected SystemBundle systemBundle
public OSGiAdapter(File workingDir)
public OSGiAdapter(File workingDir, File dataDir, Properties properties)
public void removeService(String clazz)
protected void initialize(Properties properties)
public void setSystemBundle(SystemBundle systemBundle) throws org.osgi.framework.BundleException
org.osgi.framework.BundleException
public BundleRegistry getRegistry()
public String getProperty(String key)
public String getProperty(String key, String defvalue)
public void setProperty(String name, String value)
name
- the property name.value
- the property value.public void shutdown() throws IOException
IOException
public long getBundleId(String symbolicName)
public File getWorkingDir()
public File getDataDir()
public BundleImpl getBundle(String symbolicName)
public BundleImpl[] getInstalledBundles()
public void install(BundleImpl bundle) throws org.osgi.framework.BundleException
org.osgi.framework.BundleException
public void uninstall(BundleImpl bundle) throws org.osgi.framework.BundleException
org.osgi.framework.BundleException
public void addFrameworkListener(org.osgi.framework.FrameworkListener listener)
public void removeFrameworkListener(org.osgi.framework.FrameworkListener listener)
public void addServiceListener(org.osgi.framework.ServiceListener listener)
public void addServiceListener(org.osgi.framework.ServiceListener listener, String filter)
public void removeServiceListener(org.osgi.framework.ServiceListener listener)
public void addBundleListener(org.osgi.framework.BundleListener listener)
public void removeBundleListener(org.osgi.framework.BundleListener listener)
public void fireFrameworkEvent(org.osgi.framework.FrameworkEvent event)
public void fireServiceEvent(org.osgi.framework.ServiceEvent event)
public void fireBundleEvent(org.osgi.framework.BundleEvent event)
public org.osgi.framework.Bundle getSystemBundle()
Copyright © 2018 Nuxeo. All rights reserved.