Nuxeo Enterprise Platform 5.1

org.nuxeo.runtime.osgi
Class OSGiRuntimeService

java.lang.Object
  extended by org.nuxeo.runtime.AbstractRuntimeService
      extended by org.nuxeo.runtime.osgi.OSGiRuntimeService
All Implemented Interfaces:
EventListener, RuntimeService, org.osgi.framework.FrameworkListener
Direct Known Subclasses:
OSGiRuntimeTestService

public class OSGiRuntimeService
extends AbstractRuntimeService
implements org.osgi.framework.FrameworkListener

The default implementation of NXRuntime over an OSGi compatible environment.

Author:
Bogdan Stefanescu

Field Summary
static String NAME
           
static String PROP_CONFIG_DIR
          The osgi application config 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
           
 
Fields inherited from class org.nuxeo.runtime.AbstractRuntimeService
context, extensions, isStarted, manager, properties, workingDir
 
Constructor Summary
OSGiRuntimeService(org.osgi.framework.BundleContext context)
           
 
Method Summary
 RuntimeContext createContext(org.osgi.framework.Bundle bundle)
           
 void destroyContext(org.osgi.framework.Bundle bundle)
           
protected  void doStart()
           
protected  void doStop()
           
 void frameworkEvent(org.osgi.framework.FrameworkEvent event)
           
 org.osgi.framework.BundleContext getBundleContext()
           
static String getComponentsList(org.osgi.framework.Bundle bundle)
           
 RuntimeContext getContext(org.osgi.framework.Bundle bundle)
           
 String getName()
          Gets the name of this runtime service.
 Version getVersion()
          Gets the version of this runtime service.
 List<String> getWarnings()
           
protected  void loadComponents(org.osgi.framework.Bundle bundle, RuntimeContext ctx)
           
protected  void loadConfig()
           
 void loadProperties(File file)
           
 void loadProperties(InputStream in)
           
 void loadProperties(URL url)
           
 
Methods inherited from class org.nuxeo.runtime.AbstractRuntimeService
createComponentManager, expandVars, getAdapterManager, getBuiltinFeatureURL, getComponent, getComponent, getComponentInstance, getComponentInstance, getComponentManager, getContext, getDescription, getHome, getProperties, getProperty, getProperty, getService, isStarted, setHome, setProperty, start, startExtensions, stop, stopExtensions, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_INSTALL_DIR

public static final String PROP_INSTALL_DIR
The OSGi application install directory.

See Also:
Constant Field Values

PROP_CONFIG_DIR

public static final String PROP_CONFIG_DIR
The osgi application config directory.

See Also:
Constant Field Values

PROP_HOST_ADAPTER

public static final String PROP_HOST_ADAPTER
The host adapter.

See Also:
Constant Field Values

PROP_NUXEO_BIND_ADDRESS

public static final String PROP_NUXEO_BIND_ADDRESS
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

VERSION

public static final Version VERSION
Constructor Detail

OSGiRuntimeService

public OSGiRuntimeService(org.osgi.framework.BundleContext context)
Method Detail

getName

public String getName()
Description copied from interface: RuntimeService
Gets the name of this runtime service.

Specified by:
getName in interface RuntimeService
Returns:
the runtime service name

getVersion

public Version getVersion()
Description copied from interface: RuntimeService
Gets the version of this runtime service.

Specified by:
getVersion in interface RuntimeService
Returns:
the runtime service version

getBundleContext

public org.osgi.framework.BundleContext getBundleContext()

createContext

public RuntimeContext createContext(org.osgi.framework.Bundle bundle)
                             throws Exception
Throws:
Exception

destroyContext

public void destroyContext(org.osgi.framework.Bundle bundle)

getContext

public RuntimeContext getContext(org.osgi.framework.Bundle bundle)

getWarnings

public List<String> getWarnings()
Returns:
the warnings.

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class AbstractRuntimeService
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class AbstractRuntimeService
Throws:
Exception

loadComponents

protected void loadComponents(org.osgi.framework.Bundle bundle,
                              RuntimeContext ctx)
                       throws Exception
Throws:
Exception

getComponentsList

public static String getComponentsList(org.osgi.framework.Bundle bundle)

loadConfig

protected void loadConfig()
                   throws Exception
Throws:
Exception

loadProperties

public void loadProperties(File file)
                    throws IOException
Throws:
IOException

loadProperties

public void loadProperties(URL url)
                    throws IOException
Throws:
IOException

loadProperties

public void loadProperties(InputStream in)
                    throws IOException
Throws:
IOException

frameworkEvent

public void frameworkEvent(org.osgi.framework.FrameworkEvent event)
Specified by:
frameworkEvent in interface org.osgi.framework.FrameworkListener

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.