|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.model.impl.DefaultRuntimeContext
public class DefaultRuntimeContext
Constructor Summary | |
---|---|
DefaultRuntimeContext()
|
|
DefaultRuntimeContext(RuntimeService runtime)
|
Method Summary | |
---|---|
RegistrationInfoImpl |
createRegistrationInfo(java.io.InputStream in)
|
RegistrationInfoImpl |
createRegistrationInfo(StreamRef ref)
|
RegistrationInfo |
deploy(StreamRef ref)
Same as RuntimeContext.deploy(URL) but using a StreamRef as argument. |
RegistrationInfo |
deploy(java.lang.String location)
Deploys the component whose XML descriptor is at the given location. |
RegistrationInfo |
deploy(java.net.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. |
java.util.Map<java.lang.String,ComponentName> |
getDeployedFiles()
|
java.net.URL |
getLocalResource(java.lang.String name)
Finds a local resource having the given name. |
java.net.URL |
getResource(java.lang.String name)
Finds a resource having the given name. |
RuntimeService |
getRuntime()
Gets the current runtime service. |
boolean |
isDeployed(StreamRef ref)
Checks whether the component XML file given by the StreamRef argument was deployed. |
boolean |
isDeployed(java.lang.String location)
Checks if the component at the given location is deployed. |
boolean |
isDeployed(java.net.URL url)
Checks whether the component XML file at given URL was deployed. |
java.lang.Class<?> |
loadClass(java.lang.String className)
Loads the class given its name. |
void |
setRuntime(RuntimeService runtime)
|
void |
undeploy(StreamRef ref)
Same as RuntimeContext.undeploy(URL) but using a StreamRef as stream
reference. |
void |
undeploy(java.lang.String location)
Undeploys the component at the given location if any was deployed. |
void |
undeploy(java.net.URL url)
Undeploys a component XML descriptor given its URL. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultRuntimeContext()
public DefaultRuntimeContext(RuntimeService runtime)
Method Detail |
---|
public void setRuntime(RuntimeService runtime)
public RuntimeService getRuntime()
RuntimeContext
getRuntime
in interface RuntimeContext
public java.util.Map<java.lang.String,ComponentName> getDeployedFiles()
public java.net.URL getResource(java.lang.String name)
RuntimeContext
getResource
in interface RuntimeContext
name
- the resource name
ClassLoader.getResource(String)
public java.net.URL getLocalResource(java.lang.String name)
RuntimeContext
Only the current bundle should be searched for the resource.
getLocalResource
in interface RuntimeContext
name
- the local resource name
ClassLoader.getResource(String)
public java.lang.Class<?> loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
RuntimeContext
loadClass
in interface RuntimeContext
className
- the class name
java.lang.ClassNotFoundException
- if no such class were foundClassLoader.loadClass(String)
public RegistrationInfo deploy(java.net.URL url) throws java.lang.Exception
RuntimeContext
Do nothing if component is already deployed.
Returns the registration info of the new deployed component or null if the component was not deployed.
deploy
in interface RuntimeContext
url
- the url of the XML descriptor
java.lang.Exception
- if any error occurspublic RegistrationInfo deploy(StreamRef ref) throws java.lang.Exception
RuntimeContext
RuntimeContext.deploy(URL)
but using a StreamRef
as argument.
deploy
in interface RuntimeContext
java.lang.Exception
public void undeploy(java.net.URL url) throws java.lang.Exception
RuntimeContext
Do nothing if no component was registered for the given URL.
undeploy
in interface RuntimeContext
url
- the URL of the XML descriptor
java.lang.Exception
- if any error occurspublic void undeploy(StreamRef ref) throws java.lang.Exception
RuntimeContext
RuntimeContext.undeploy(URL)
but using a StreamRef
as stream
reference.
undeploy
in interface RuntimeContext
java.lang.Exception
public boolean isDeployed(java.net.URL url)
RuntimeContext
isDeployed
in interface RuntimeContext
url
- the URL to check
public boolean isDeployed(StreamRef ref)
RuntimeContext
isDeployed
in interface RuntimeContext
public RegistrationInfo deploy(java.lang.String location) throws java.lang.Exception
RuntimeContext
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
RuntimeContext.getLocalResource(String)
.
Returns the registration info of the new deployed component or null if the component was not deployed.
deploy
in interface RuntimeContext
location
- the location
java.lang.Exception
public void undeploy(java.lang.String location) throws java.lang.Exception
RuntimeContext
If the component was not deployed do nothing.
undeploy
in interface RuntimeContext
location
- the location of the component to undeploy
java.lang.Exception
- if any error occurspublic boolean isDeployed(java.lang.String location)
RuntimeContext
isDeployed
in interface RuntimeContext
location
- the component location to check
public void destroy()
RuntimeContext
destroy
in interface RuntimeContext
public org.osgi.framework.Bundle getBundle()
RuntimeContext
getBundle
in interface RuntimeContext
public RegistrationInfoImpl createRegistrationInfo(StreamRef ref) throws java.lang.Exception
java.lang.Exception
public RegistrationInfoImpl createRegistrationInfo(java.io.InputStream in) throws java.lang.Exception
java.lang.Exception
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |