|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuxeo.runtime.remoting.RemoteContext
public class RemoteContext
TODO: Work in progress. What works: loading resources What doesn't work: loading remote objects that refrences on other remote classes (try to use ClassByteClassLoader from jboss-remoting)
| Constructor Summary | |
|---|---|
RemoteContext(ServerDescriptor sd,
ComponentName component,
ClassLoader localClassLoader)
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteContext(ServerDescriptor sd,
ComponentName component,
ClassLoader localClassLoader)
throws Exception
Exception| Method Detail |
|---|
public URL getLocalResource(String name)
RuntimeContextOnly the current bundle should be searched for the resource.
getLocalResource in interface RuntimeContextname - the local resource name
ClassLoader.getResource(String)public URL getResource(String name)
RuntimeContext
getResource in interface RuntimeContextname - the resource name
ClassLoader.getResource(String)
public Class loadClass(String className)
throws ClassNotFoundException
RuntimeContext
loadClass in interface RuntimeContextclassName - the class name
ClassNotFoundException - if no such class were foundClassLoader.loadClass(String)public RuntimeService getRuntime()
RuntimeContext
getRuntime in interface RuntimeContextpublic boolean isDeployed(URL url)
RuntimeContext
isDeployed in interface RuntimeContexturl - the url to check
public boolean isDeployed(String location)
RuntimeContext
isDeployed in interface RuntimeContextlocation - the component location to check
public void undeploy(URL url)
throws Exception
RuntimeContextDo nothing if no component was registered fro the given URL.
undeploy in interface RuntimeContexturl - the url of the XML descriptor
Exception - if any error occurs
public void undeploy(String location)
throws Exception
RuntimeContextIf the component was not deployed do nothing.
undeploy in interface RuntimeContextlocation - the location of the component to undeploy
Exception - if any error occurs
public void deploy(URL url)
throws Exception
RuntimeContextDo nothing if component is already deployed.
deploy in interface RuntimeContexturl - the url of the XML descriptor
Exception - if any error occurs
public void deploy(String location)
throws Exception
RuntimeContextIf 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
RuntimeContext.getLocalResource(String).
deploy in interface RuntimeContextlocation - the location
Exceptionpublic void destroy()
RuntimeContext
destroy in interface RuntimeContextpublic org.osgi.framework.Bundle getBundle()
RuntimeContext
getBundle in interface RuntimeContext
|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||