public class OSGiRuntimeContext extends DefaultRuntimeContext
Constructor and Description |
---|
OSGiRuntimeContext(org.osgi.framework.Bundle bundle) |
OSGiRuntimeContext(RuntimeService runtime,
org.osgi.framework.Bundle bundle) |
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.Bundle |
getBundle()
Gets the container bundle or null if we are not running in an OSGi environment.
|
org.osgi.framework.Bundle |
getHostBundle() |
URL |
getLocalResource(String name)
Finds a local resource having the given name.
|
URL |
getResource(String name)
Finds a resource having the given name.
|
Class<?> |
loadClass(String className)
Loads the class given its name.
|
createRegistrationInfo, createRegistrationInfo, deploy, deploy, deploy, destroy, getDeployedFiles, getRuntime, isDeployed, isDeployed, isDeployed, setRuntime, undeploy, undeploy, undeploy
public OSGiRuntimeContext(org.osgi.framework.Bundle bundle)
public OSGiRuntimeContext(RuntimeService runtime, org.osgi.framework.Bundle bundle)
public org.osgi.framework.Bundle getBundle()
RuntimeContext
getBundle
in interface RuntimeContext
getBundle
in class DefaultRuntimeContext
public URL getResource(String name)
RuntimeContext
getResource
in interface RuntimeContext
getResource
in class DefaultRuntimeContext
name
- the resource nameClassLoader.getResource(String)
public URL getLocalResource(String name)
RuntimeContext
Only the current bundle should be searched for the resource.
getLocalResource
in interface RuntimeContext
getLocalResource
in class DefaultRuntimeContext
name
- the local resource nameClassLoader.getResource(String)
public Class<?> loadClass(String className) throws ClassNotFoundException
RuntimeContext
loadClass
in interface RuntimeContext
loadClass
in class DefaultRuntimeContext
className
- the class nameClassNotFoundException
- if no such class were foundClassLoader.loadClass(String)
public org.osgi.framework.Bundle getHostBundle()
Copyright © 2015 Nuxeo SA. All rights reserved.