|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.runtime.AbstractRuntimeService
public abstract class AbstractRuntimeService
Abstract implementation of the Runtime Service.
Implementors are encouraged to extend this class instead of directly
implementing the RuntimeService
interface.
Field Summary | |
---|---|
static String |
REDIRECT_JUL
Property that controls whether or not to redirect JUL to JCL. |
static String |
REDIRECT_JUL_THRESHOLD
|
Method Summary | ||
---|---|---|
String |
expandVars(String expression)
Replaces any substring in the form ${property.name} with the
corresponding runtime property value if any, otherwise leaves the
substring unchanged. |
|
org.osgi.framework.Bundle |
getBundle(String symbolicName)
Get an installed bundle given its symbolic name. |
|
File |
getBundleFile(org.osgi.framework.Bundle bundle)
OSGi frameworks are using a string Bundle.getLocation() to
identify bundle locations. |
|
Object |
getComponent(ComponentName name)
Gets a component given its name. |
|
Object |
getComponent(String name)
Gets a component given its name as a string. |
|
ComponentInstance |
getComponentInstance(ComponentName name)
Gets a component implementation instance given its name. |
|
ComponentInstance |
getComponentInstance(String name)
Gets a component implementation instance given its name as a string. |
|
ComponentManager |
getComponentManager()
Gets the component manager. |
|
RuntimeContext |
getContext()
Gets the context of the runtime bundle. |
|
String |
getDescription()
Gets the description of this runtime service. |
|
File |
getHome()
Gets the home directory of the runtime. |
|
Properties |
getProperties()
Gets runtime service properties. |
|
String |
getProperty(String name)
Gets a runtime service property given its name. |
|
String |
getProperty(String name,
String defValue)
Gets a property value using a default value if the property was not set. |
|
|
getService(Class<T> serviceClass)
Gets the service of type serviceClass if such a service was declared by a resolved runtime component. |
|
List<String> |
getWarnings()
Gets a list of startup warnings. |
|
boolean |
isStarted()
Tests whether or not the runtime is started. |
|
void |
setHome(File home)
|
|
void |
setProperty(String name,
Object value)
|
|
void |
start()
Starts the runtime. |
|
void |
stop()
Stops the runtime. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.nuxeo.runtime.RuntimeService |
---|
getName, getVersion, reloadProperties |
Field Detail |
---|
public static final String REDIRECT_JUL
public static final String REDIRECT_JUL_THRESHOLD
Method Detail |
---|
public List<String> getWarnings()
RuntimeService
getWarnings
in interface RuntimeService
public void start() throws Exception
RuntimeService
start
in interface RuntimeService
Exception
- if any exception occurred during startuppublic void stop() throws Exception
RuntimeService
stop
in interface RuntimeService
Exception
- if any exception occurred during shutdownpublic boolean isStarted()
RuntimeService
isStarted
in interface RuntimeService
public File getHome()
RuntimeService
getHome
in interface RuntimeService
public void setHome(File home)
public String getDescription()
RuntimeService
getDescription
in interface RuntimeService
public Properties getProperties()
RuntimeService
getProperties
in interface RuntimeService
public String getProperty(String name)
RuntimeService
getProperty
in interface RuntimeService
name
- the property name
public String getProperty(String name, String defValue)
RuntimeService
getProperty
in interface RuntimeService
name
- the property namedefValue
- the default value to use when the property doesn't
exists
public void setProperty(String name, Object value)
public String toString()
toString
in class Object
public Object getComponent(String name)
RuntimeService
getComponent
in interface RuntimeService
name
- the component name as a string
public Object getComponent(ComponentName name)
RuntimeService
getComponent
in interface RuntimeService
name
- the component name
public ComponentInstance getComponentInstance(String name)
RuntimeService
getComponentInstance
in interface RuntimeService
name
- the component name as a string
public ComponentInstance getComponentInstance(ComponentName name)
RuntimeService
getComponentInstance
in interface RuntimeService
name
- the component name
public ComponentManager getComponentManager()
RuntimeService
getComponentManager
in interface RuntimeService
public RuntimeContext getContext()
RuntimeService
getContext
in interface RuntimeService
public <T> T getService(Class<T> serviceClass)
RuntimeService
If the component is not yet activated, it will be prior to return the service.
getService
in interface RuntimeService
T
- the service typeserviceClass
- the service class
public String expandVars(String expression)
RuntimeService
${property.name}
with the
corresponding runtime property value if any, otherwise leaves the
substring unchanged.
expandVars
in interface RuntimeService
expression
- the expression to process
public File getBundleFile(org.osgi.framework.Bundle bundle)
RuntimeService
Bundle.getLocation()
to
identify bundle locations.
This method try to convert the bundle location to real file if possible. If this bundle location cannot be converted to a file (e.g. it may be a remote URL), null is returned.
This method works only for bundles that are installed as files on the host file system.
getBundleFile
in interface RuntimeService
public org.osgi.framework.Bundle getBundle(String symbolicName)
RuntimeService
getBundle
in interface RuntimeService
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |