com.atlassian.plugin.osgi.container.felix
Class FelixOsgiContainerManager

java.lang.Object
  extended by com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager
All Implemented Interfaces:
OsgiContainerManager

public class FelixOsgiContainerManager
extends java.lang.Object
implements OsgiContainerManager

Felix implementation of the OSGi container manager


Field Summary
static java.lang.String OSGI_FRAMEWORK_BUNDLES_ZIP
           
 
Constructor Summary
FelixOsgiContainerManager(java.io.File frameworkBundlesDir, PackageScannerConfiguration packageScannerConfig)
           
FelixOsgiContainerManager(java.net.URL frameworkBundlesZip, java.io.File frameworkBundlesDir, PackageScannerConfiguration packageScannerConfig)
           
 
Method Summary
 org.osgi.framework.Bundle[] getBundles()
          Gets a list of installed bundles
 java.util.List<HostComponentRegistration> getHostComponentRegistrations()
          Gets a list of host component registrations
 org.osgi.framework.ServiceReference[] getRegisteredServices()
          Gets a list of service references
 org.osgi.framework.Bundle installBundle(java.io.File file)
          Installs a bundle into a running OSGI container
 boolean isRunning()
           
 void reloadHostComponents(HostComponentProvider provider)
          Reloads all host components used
 void start(HostComponentProvider provider)
          Starts the OSGi container
 void stop()
          Stops the OSGi container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OSGI_FRAMEWORK_BUNDLES_ZIP

public static final java.lang.String OSGI_FRAMEWORK_BUNDLES_ZIP
See Also:
Constant Field Values
Constructor Detail

FelixOsgiContainerManager

public FelixOsgiContainerManager(java.io.File frameworkBundlesDir,
                                 PackageScannerConfiguration packageScannerConfig)

FelixOsgiContainerManager

public FelixOsgiContainerManager(java.net.URL frameworkBundlesZip,
                                 java.io.File frameworkBundlesDir,
                                 PackageScannerConfiguration packageScannerConfig)
Method Detail

start

public void start(HostComponentProvider provider)
           throws OsgiContainerException
Description copied from interface: OsgiContainerManager
Starts the OSGi container

Specified by:
start in interface OsgiContainerManager
Parameters:
provider - The host component provider to use when registering host services
Throws:
OsgiContainerException - If the container cannot be started

stop

public void stop()
          throws OsgiContainerException
Description copied from interface: OsgiContainerManager
Stops the OSGi container

Specified by:
stop in interface OsgiContainerManager
Throws:
OsgiContainerException - If the container cannot be stopped

getBundles

public org.osgi.framework.Bundle[] getBundles()
Description copied from interface: OsgiContainerManager
Gets a list of installed bundles

Specified by:
getBundles in interface OsgiContainerManager
Returns:
An array of bundles

getRegisteredServices

public org.osgi.framework.ServiceReference[] getRegisteredServices()
Description copied from interface: OsgiContainerManager
Gets a list of service references

Specified by:
getRegisteredServices in interface OsgiContainerManager
Returns:
An array of service references

installBundle

public org.osgi.framework.Bundle installBundle(java.io.File file)
                                        throws OsgiContainerException
Description copied from interface: OsgiContainerManager
Installs a bundle into a running OSGI container

Specified by:
installBundle in interface OsgiContainerManager
Parameters:
file - The bundle file to install
Returns:
The created bundle
Throws:
OsgiContainerException - If the bundle cannot be loaded

reloadHostComponents

public void reloadHostComponents(HostComponentProvider provider)
Description copied from interface: OsgiContainerManager
Reloads all host components used

Specified by:
reloadHostComponents in interface OsgiContainerManager
Parameters:
provider - The host component provider to use when registering host services

isRunning

public boolean isRunning()
Specified by:
isRunning in interface OsgiContainerManager
Returns:
If the container is running or not

getHostComponentRegistrations

public java.util.List<HostComponentRegistration> getHostComponentRegistrations()
Description copied from interface: OsgiContainerManager
Gets a list of host component registrations

Specified by:
getHostComponentRegistrations in interface OsgiContainerManager
Returns:
A list of host component registrations


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.