|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RuntimeContext
The runtime context.
Runtime contexts are used to create components. They provides custom methods to load classes and find resources.
Runtime contexts are generally attached to a bundle context (or module deployment context)
| Method Summary | |
|---|---|
void |
deploy(String location)
Deploys the component whose XML descriptor is at the given location. |
void |
deploy(URL url)
Deploys a component XML descriptor given its URL. |
void |
destroy()
Destroys this context. |
org.osgi.framework.Bundle |
getBundle()
Gets the container bundle or null if we are not running in an OSGi environment. |
URL |
getLocalResource(String name)
Finds a local resource having the given name. |
URL |
getResource(String name)
Finds a resource having the given name. |
RuntimeService |
getRuntime()
Gets the curent runtime service. |
boolean |
isDeployed(String location)
Checks if the component at the given location is deployed. |
boolean |
isDeployed(URL url)
Checks whether the component XML file at given URL was deployeds. |
Class |
loadClass(String className)
Loads the class given its name. |
void |
undeploy(String location)
Undeploys the component at the given location if any was deployed. |
void |
undeploy(URL url)
Undeploys a component XML descriptor given its URL. |
| Method Detail |
|---|
RuntimeService getRuntime()
org.osgi.framework.Bundle getBundle()
Class loadClass(String className)
throws ClassNotFoundException
className - the class name
ClassNotFoundException - if no such class were foundClassLoader.loadClass(String)URL getResource(String name)
name - the resource name
ClassLoader.getResource(String)URL getLocalResource(String name)
Only the current bundle should be searched for the resource.
name - the local resource name
ClassLoader.getResource(String)
void deploy(URL url)
throws Exception
Do nothing if component is already deployed.
url - the url of the XML descriptor
Exception - if any error occurs
void undeploy(URL url)
throws Exception
Do nothing if no component was registered fro the given URL.
url - the url of the XML descriptor
Exception - if any error occursboolean isDeployed(URL url)
url - the url to check
void deploy(String location)
throws Exception
If the component is already deployed do nothing.
The location is interpreted as a relative path inside the bundle (jar)
containing the component - and will be loaded using
getLocalResource(String).
location - the location
Exception
void undeploy(String location)
throws Exception
If the component was not deployed do nothing.
location - the location of the component to undeploy
Exception - if any error occursboolean isDeployed(String location)
location - the component location to check
void destroy()
|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||