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)
SystemFrameworkgetFramework in interface SystemFrameworkpublic void ungetFramework(org.osgi.framework.launch.Framework framework)
SystemFrameworkungetFramework in interface SystemFrameworkpublic boolean isSystemBundle(org.osgi.framework.Bundle bundle)
SystemFrameworkisSystemBundle in interface SystemFrameworkpublic <T> java.lang.Class<T> loadClassFromBundle(java.lang.String type,
org.osgi.framework.Bundle b)
throws java.lang.ClassNotFoundException
SystemFrameworkloadClassFromBundle in interface SystemFrameworkjava.lang.ClassNotFoundExceptionpublic <T> java.net.URL getResourceFromBundle(java.lang.String type,
org.osgi.framework.Bundle b)
SystemFrameworkgetResourceFromBundle in interface SystemFrameworkpublic <T> java.util.Enumeration<java.net.URL> getResourcesFromBundle(java.lang.String type,
org.osgi.framework.Bundle b)
throws java.io.IOException
SystemFrameworkgetResourcesFromBundle in interface SystemFrameworkjava.io.IOException