public class EmbeddedFramework extends java.lang.Object implements SystemFramework
Constructor and Description |
---|
EmbeddedFramework() |
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.launch.Framework |
getFramework(java.lang.String felixCacheDir,
boolean clean)
Provides an OSGI framework.
|
<T> java.net.URL |
getResourceFromBundle(java.lang.String type,
org.osgi.framework.Bundle b)
Loads a resource from the passed bundle.
|
<T> java.util.Enumeration<java.net.URL> |
getResourcesFromBundle(java.lang.String type,
org.osgi.framework.Bundle b)
Loads resources from the passed bundle.
|
boolean |
isSystemBundle(org.osgi.framework.Bundle bundle)
Whether the bundle is exporting classes from the application class path.
|
<T> java.lang.Class<T> |
loadClassFromBundle(java.lang.String type,
org.osgi.framework.Bundle b)
Loads a class from the passed bundle.
|
void |
ungetFramework(org.osgi.framework.launch.Framework framework)
Stops/ungets the OSGi framework, depending on the environment.
|
public org.osgi.framework.launch.Framework getFramework(java.lang.String felixCacheDir, boolean clean)
SystemFramework
getFramework
in interface SystemFramework
public void ungetFramework(org.osgi.framework.launch.Framework framework)
SystemFramework
ungetFramework
in interface SystemFramework
public boolean isSystemBundle(org.osgi.framework.Bundle bundle)
SystemFramework
isSystemBundle
in interface SystemFramework
public <T> java.lang.Class<T> loadClassFromBundle(java.lang.String type, org.osgi.framework.Bundle b) throws java.lang.ClassNotFoundException
SystemFramework
loadClassFromBundle
in interface SystemFramework
java.lang.ClassNotFoundException
public <T> java.net.URL getResourceFromBundle(java.lang.String type, org.osgi.framework.Bundle b)
SystemFramework
getResourceFromBundle
in interface SystemFramework
public <T> java.util.Enumeration<java.net.URL> getResourcesFromBundle(java.lang.String type, org.osgi.framework.Bundle b) throws java.io.IOException
SystemFramework
getResourcesFromBundle
in interface SystemFramework
java.io.IOException