public class OSGiRuntimeService extends AbstractRuntimeService implements org.osgi.framework.FrameworkListener
AbstractRuntimeService.LogConfig
Modifier and Type | Field and Description |
---|---|
static ComponentName |
FRAMEWORK_STARTED_COMP |
static String |
NAME |
static String |
PROP_CONFIG_DIR
The OSGi application config directory.
|
static String |
PROP_HOME_DIR
Can be used to change the runtime home directory
|
static String |
PROP_HOST_ADAPTER
The host adapter.
|
static String |
PROP_INSTALL_DIR
The OSGi application install directory.
|
static String |
PROP_NUXEO_BIND_ADDRESS |
static Version |
VERSION |
context, isShuttingDown, isStarted, LOG4J_WATCH_DELAY, LOG4J_WATCH_DELAY_DEFAULT, LOG4J_WATCH_DISABLED, logConfig, manager, messageHandler, properties, REDIRECT_JUL, REDIRECT_JUL_THRESHOLD, workingDir
Constructor and Description |
---|
OSGiRuntimeService(org.osgi.framework.BundleContext context) |
OSGiRuntimeService(OSGiRuntimeContext runtimeContext,
org.osgi.framework.BundleContext context) |
Modifier and Type | Method and Description |
---|---|
RuntimeContext |
createContext(org.osgi.framework.Bundle bundle) |
protected void |
deployFrameworkStartedComponent() |
void |
destroyContext(org.osgi.framework.Bundle bundle) |
protected void |
doStart() |
protected void |
doStop() |
String |
expandVars(String expression)
Overrides the default method to be able to include OSGi properties.
|
org.osgi.framework.Bundle |
findHostBundle(org.osgi.framework.Bundle bundle) |
void |
frameworkEvent(org.osgi.framework.FrameworkEvent event) |
org.osgi.framework.Bundle |
getBundle(String symbolicName)
Get an installed bundle given its symbolic name.
|
org.osgi.framework.BundleContext |
getBundleContext() |
File |
getBundleFile(org.osgi.framework.Bundle bundle)
OSGi frameworks are using a string
Bundle.getLocation() to identify bundle locations. |
Map<String,org.osgi.framework.Bundle> |
getBundlesMap() |
ComponentPersistence |
getComponentPersistence() |
static String |
getComponentsList(org.osgi.framework.Bundle bundle) |
RuntimeContext |
getContext(org.osgi.framework.Bundle bundle) |
RuntimeContext |
getContext(String symbolicName) |
protected File |
getEclipseBundleFileUsingReflection(org.osgi.framework.Bundle bundle) |
String |
getName()
Gets the name of this runtime service.
|
String |
getProperty(String name,
String defValue)
Overrides the default method to be able to include OSGi properties.
|
Version |
getVersion()
Gets the version of this runtime service.
|
static boolean |
isJBoss4(Environment env) |
protected void |
loadComponents(org.osgi.framework.Bundle bundle,
RuntimeContext ctx) |
protected void |
loadConfig() |
protected boolean |
loadConfigurationFromProvider() |
protected void |
loadDefaultConfig()
Loads default properties.
|
void |
loadProperties(File file) |
void |
loadProperties(InputStream in) |
void |
loadProperties(URL url) |
protected static void |
printDeploymentOrderInfo(String[] fileNames) |
void |
reloadProperties()
Reread all property files loaded at startup.
|
protected void |
startComponents() |
createComponentManager, getBuiltinFeatureURL, getComponent, getComponentInstance, getComponentManager, getContext, getDescription, getErrorLoggerThread, getHome, getMessageHandler, getProperties, getProperty, getService, getStatusMessage, isShuttingDown, isStarted, setHome, setProperty, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponent, getComponentInstance
public static final ComponentName FRAMEWORK_STARTED_COMP
public static final String PROP_HOME_DIR
public static final String PROP_INSTALL_DIR
public static final String PROP_CONFIG_DIR
public static final String PROP_HOST_ADAPTER
public static final String PROP_NUXEO_BIND_ADDRESS
public static final String NAME
public OSGiRuntimeService(org.osgi.framework.BundleContext context)
public OSGiRuntimeService(OSGiRuntimeContext runtimeContext, org.osgi.framework.BundleContext context)
public String getName()
RuntimeService
getName
in interface RuntimeService
public Version getVersion()
RuntimeService
getVersion
in interface RuntimeService
public org.osgi.framework.BundleContext getBundleContext()
public org.osgi.framework.Bundle getBundle(String symbolicName)
RuntimeService
getBundle
in interface RuntimeService
getBundle
in class AbstractRuntimeService
public Map<String,org.osgi.framework.Bundle> getBundlesMap()
public ComponentPersistence getComponentPersistence()
public RuntimeContext createContext(org.osgi.framework.Bundle bundle)
public void destroyContext(org.osgi.framework.Bundle bundle)
public RuntimeContext getContext(org.osgi.framework.Bundle bundle)
public RuntimeContext getContext(String symbolicName)
protected void doStart()
doStart
in class AbstractRuntimeService
protected void doStop()
doStop
in class AbstractRuntimeService
protected void loadComponents(org.osgi.framework.Bundle bundle, RuntimeContext ctx)
public static String getComponentsList(org.osgi.framework.Bundle bundle)
protected boolean loadConfigurationFromProvider() throws IOException
IOException
protected void loadConfig() throws IOException
loadConfig
in class AbstractRuntimeService
IOException
protected static void printDeploymentOrderInfo(String[] fileNames)
public void reloadProperties() throws IOException
RuntimeService
reloadProperties
in interface RuntimeService
IOException
protected void loadDefaultConfig()
Used for backward compatibility when adding new mandatory properties
public void loadProperties(File file) throws IOException
IOException
public void loadProperties(URL url) throws IOException
IOException
public void loadProperties(InputStream in) throws IOException
IOException
public String getProperty(String name, String defValue)
getProperty
in interface RuntimeService
getProperty
in class AbstractRuntimeService
name
- the property namedefValue
- the default value to use when the property doesn't existspublic String expandVars(String expression)
expandVars
in interface RuntimeService
expandVars
in class AbstractRuntimeService
expression
- the expression to processprotected void startComponents()
public void frameworkEvent(org.osgi.framework.FrameworkEvent event)
frameworkEvent
in interface org.osgi.framework.FrameworkListener
protected void deployFrameworkStartedComponent()
public org.osgi.framework.Bundle findHostBundle(org.osgi.framework.Bundle bundle)
protected File getEclipseBundleFileUsingReflection(org.osgi.framework.Bundle bundle)
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
getBundleFile
in class AbstractRuntimeService
public static boolean isJBoss4(Environment env)
Copyright © 2018 Nuxeo. All rights reserved.