|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager
public class FelixOsgiContainerManager
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,
HostComponentProvider provider,
PluginEventManager eventManager)
Constructs the container manager using the framework bundles zip file located in this library |
|
FelixOsgiContainerManager(java.net.URL frameworkBundlesZip,
java.io.File frameworkBundlesDir,
PackageScannerConfiguration packageScannerConfig,
HostComponentProvider provider,
PluginEventManager eventManager)
Constructs the container manager |
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.util.tracker.ServiceTracker |
getServiceTracker(java.lang.String cls)
Gets a service tracker to follow a service registered under a certain interface |
org.osgi.framework.Bundle |
installBundle(java.io.File file)
Installs a bundle into a running OSGI container |
boolean |
isRunning()
|
void |
onShtudown(PluginFrameworkShutdownEvent event)
|
void |
onStart(PluginFrameworkStartingEvent event)
|
void |
setDisableMultipleBundleVersions(boolean val)
|
void |
setFelixLogger(org.apache.felix.framework.Logger logger)
|
void |
start()
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 |
---|
public static final java.lang.String OSGI_FRAMEWORK_BUNDLES_ZIP
Constructor Detail |
---|
public FelixOsgiContainerManager(java.io.File frameworkBundlesDir, PackageScannerConfiguration packageScannerConfig, HostComponentProvider provider, PluginEventManager eventManager)
frameworkBundlesDir
- The directory to unzip the framework bundles into.packageScannerConfig
- The configuration for package scanningprovider
- The host component provider. May be null.eventManager
- The plugin event manager to register for init and shutdown eventspublic FelixOsgiContainerManager(java.net.URL frameworkBundlesZip, java.io.File frameworkBundlesDir, PackageScannerConfiguration packageScannerConfig, HostComponentProvider provider, PluginEventManager eventManager)
frameworkBundlesZip
- The location of the zip file containing framework bundlesframeworkBundlesDir
- The directory to unzip the framework bundles into.packageScannerConfig
- The configuration for package scanningprovider
- The host component provider. May be null.eventManager
- The plugin event manager to register for init and shutdown eventsMethod Detail |
---|
public void setFelixLogger(org.apache.felix.framework.Logger logger)
public void setDisableMultipleBundleVersions(boolean val)
public void onStart(PluginFrameworkStartingEvent event)
public void onShtudown(PluginFrameworkShutdownEvent event)
public void start() throws OsgiContainerException
OsgiContainerManager
start
in interface OsgiContainerManager
OsgiContainerException
- If the container cannot be startedpublic void stop() throws OsgiContainerException
OsgiContainerManager
stop
in interface OsgiContainerManager
OsgiContainerException
- If the container cannot be stoppedpublic org.osgi.framework.Bundle[] getBundles()
OsgiContainerManager
getBundles
in interface OsgiContainerManager
public org.osgi.framework.ServiceReference[] getRegisteredServices()
OsgiContainerManager
getRegisteredServices
in interface OsgiContainerManager
public org.osgi.util.tracker.ServiceTracker getServiceTracker(java.lang.String cls)
OsgiContainerManager
getServiceTracker
in interface OsgiContainerManager
cls
- The interface class as a String
public org.osgi.framework.Bundle installBundle(java.io.File file) throws OsgiContainerException
OsgiContainerManager
installBundle
in interface OsgiContainerManager
file
- The bundle file to install
OsgiContainerException
- If the bundle cannot be loadedpublic boolean isRunning()
isRunning
in interface OsgiContainerManager
public java.util.List<HostComponentRegistration> getHostComponentRegistrations()
OsgiContainerManager
getHostComponentRegistrations
in interface OsgiContainerManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |