|
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.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 | |
|---|---|
protected RuntimeContext |
context
|
protected List<RuntimeExtension> |
extensions
|
protected boolean |
isStarted
|
protected ComponentManager |
manager
|
protected Properties |
properties
|
protected File |
workingDir
|
| Constructor Summary | |
|---|---|
protected |
AbstractRuntimeService(DefaultRuntimeContext context)
|
protected |
AbstractRuntimeService(DefaultRuntimeContext context,
Map<String,String> properties)
|
| Method Summary | ||
|---|---|---|
protected ComponentManager |
createComponentManager()
|
|
protected void |
doStart()
|
|
protected void |
doStop()
|
|
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. |
|
AdapterManager |
getAdapterManager()
|
|
protected static URL |
getBuiltinFeatureURL()
|
|
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. |
|
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. |
|
protected void |
startExtensions()
|
|
void |
stop()
Stops the runtime. |
|
protected void |
stopExtensions()
|
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.nuxeo.runtime.RuntimeService |
|---|
getName, getVersion |
| Field Detail |
|---|
protected boolean isStarted
protected File workingDir
protected final Properties properties
protected ComponentManager manager
protected final RuntimeContext context
protected final List<RuntimeExtension> extensions
| Constructor Detail |
|---|
protected AbstractRuntimeService(DefaultRuntimeContext context)
protected AbstractRuntimeService(DefaultRuntimeContext context,
Map<String,String> properties)
| Method Detail |
|---|
protected ComponentManager createComponentManager()
protected static URL getBuiltinFeatureURL()
public void start()
throws Exception
RuntimeService
start in interface RuntimeServiceException - if any exception occurred during startup
public void stop()
throws Exception
RuntimeService
stop in interface RuntimeServiceException - if any exception occurred during shutdownpublic boolean isStarted()
RuntimeService
isStarted in interface RuntimeService
protected void doStart()
throws Exception
Exception
protected void doStop()
throws Exception
Exceptionpublic File getHome()
RuntimeService
getHome in interface RuntimeServicepublic void setHome(File home)
public String getDescription()
RuntimeService
getDescription in interface RuntimeServicepublic AdapterManager getAdapterManager()
public Properties getProperties()
RuntimeService
getProperties in interface RuntimeServicepublic String getProperty(String name)
RuntimeService
getProperty in interface RuntimeServicename - the property name
public String getProperty(String name,
String defValue)
RuntimeService
getProperty in interface RuntimeServicename - 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 Objectpublic Object getComponent(String name)
RuntimeService
getComponent in interface RuntimeServicename - the component name as a string
public Object getComponent(ComponentName name)
RuntimeService
getComponent in interface RuntimeServicename - the component name
public ComponentInstance getComponentInstance(String name)
RuntimeService
getComponentInstance in interface RuntimeServicename - the component name as a string
public ComponentInstance getComponentInstance(ComponentName name)
RuntimeService
getComponentInstance in interface RuntimeServicename - the component name
public ComponentManager getComponentManager()
RuntimeService
getComponentManager in interface RuntimeServicepublic RuntimeContext getContext()
RuntimeService
getContext in interface RuntimeServiceprotected void startExtensions()
protected void stopExtensions()
public <T> T getService(Class<T> serviceClass)
RuntimeServiceIf the component is not yet activated it will be prior to return the service.
getService in interface RuntimeServiceT - 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 RuntimeServiceexpression - the expression to process
|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||