com.atlassian.plugin.osgi.container
Interface OsgiContainerManager

All Known Implementing Classes:
FelixOsgiContainerManager

public interface OsgiContainerManager

Manages the OSGi container and handles any interactions with it


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
 

Method Detail

start

void start(HostComponentProvider provider)
           throws OsgiContainerException
Starts the OSGi container

Parameters:
provider - The host component provider to use when registering host services
Throws:
OsgiContainerException - If the container cannot be started

stop

void stop()
          throws OsgiContainerException
Stops the OSGi container

Throws:
OsgiContainerException - If the container cannot be stopped

installBundle

org.osgi.framework.Bundle installBundle(java.io.File file)
                                        throws OsgiContainerException
Installs a bundle into a running OSGI container

Parameters:
file - The bundle file to install
Returns:
The created bundle
Throws:
OsgiContainerException - If the bundle cannot be loaded

reloadHostComponents

void reloadHostComponents(HostComponentProvider provider)
Reloads all host components used

Parameters:
provider - The host component provider to use when registering host services

isRunning

boolean isRunning()
Returns:
If the container is running or not

getBundles

org.osgi.framework.Bundle[] getBundles()
Gets a list of installed bundles

Returns:
An array of bundles

getRegisteredServices

org.osgi.framework.ServiceReference[] getRegisteredServices()
Gets a list of service references

Returns:
An array of service references

getHostComponentRegistrations

java.util.List<HostComponentRegistration> getHostComponentRegistrations()
Gets a list of host component registrations

Returns:
A list of host component registrations


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.