|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager
public class FelixOsgiContainerManager
Felix implementation of the OSGi container manager
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.plugin.osgi.container.OsgiContainerManager |
|---|
OsgiContainerManager.AllowsReferenceInstall |
| Nested classes/interfaces inherited from interface com.atlassian.plugin.osgi.container.OsgiContainerManager.AllowsReferenceInstall |
|---|
OsgiContainerManager.AllowsReferenceInstall.Default |
| Field Summary | |
|---|---|
static java.lang.String |
OSGI_FRAMEWORK_BUNDLES_ZIP
|
static int |
REFRESH_TIMEOUT
|
| Method Summary | |
|---|---|
void |
clearExportCache()
Clears export cache. |
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 interfaceClassName)
Gets a service tracker to follow a service registered under a certain interface. |
org.osgi.util.tracker.ServiceTracker |
getServiceTracker(java.lang.String interfaceClassName,
org.osgi.util.tracker.ServiceTrackerCustomizer serviceTrackerCustomizer)
Gets a service tracker to follow a service registered under a certain interface with a ServiceTrackerCustomizer attached for customizing tracked service objects. |
org.osgi.framework.Bundle |
installBundle(java.io.File file)
Installs a bundle into a running OSGI container |
org.osgi.framework.Bundle |
installBundle(java.io.File file,
boolean allowReference)
Installs a bundle into a running OSGI container. |
boolean |
isRunning()
|
void |
onPluginFrameworkWarmRestarting(PluginFrameworkWarmRestartingEvent event)
|
void |
onPluginUninstallation(PluginUninstalledEvent event)
|
void |
onPluginUpgrade(PluginUpgradedEvent event)
|
void |
onShutdown(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
public static final int REFRESH_TIMEOUT
| Constructor Detail |
|---|
@Deprecated
public FelixOsgiContainerManager(java.io.File frameworkBundlesDir,
PackageScannerConfiguration packageScannerConfig,
HostComponentProvider provider,
PluginEventManager eventManager)
FelixOsgiContainerManager(OsgiPersistentCache,PackageScannerConfiguration,HostComponentProvider,PluginEventManager) instead
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 events
@Deprecated
public FelixOsgiContainerManager(java.net.URL frameworkBundlesZip,
java.io.File frameworkBundlesDir,
PackageScannerConfiguration packageScannerConfig,
HostComponentProvider provider,
PluginEventManager eventManager)
FelixOsgiContainerManager(URL, OsgiPersistentCache,PackageScannerConfiguration,HostComponentProvider,PluginEventManager) instead
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 events
public FelixOsgiContainerManager(OsgiPersistentCache persistentCache,
PackageScannerConfiguration packageScannerConfig,
HostComponentProvider provider,
PluginEventManager eventManager)
persistentCache - The persistent cache configuration.packageScannerConfig - The configuration for package scanningprovider - The host component provider. May be null.eventManager - The plugin event manager to register for init and shutdown events
public FelixOsgiContainerManager(java.net.URL frameworkBundlesZip,
OsgiPersistentCache persistentCache,
PackageScannerConfiguration packageScannerConfig,
HostComponentProvider provider,
PluginEventManager eventManager)
throws OsgiContainerException
frameworkBundlesZip - The location of the zip file containing framework bundlespersistentCache - The persistent cache to use for the framework and framework bundlespackageScannerConfig - The configuration for package scanningprovider - The host component provider. May be null.eventManager - The plugin event manager to register for init and shutdown events
OsgiContainerException - If the host version isn't supplied and the
cache directory cannot be cleaned.| Method Detail |
|---|
public void setFelixLogger(org.apache.felix.framework.Logger logger)
public void setDisableMultipleBundleVersions(boolean val)
public void clearExportCache()
public void onStart(PluginFrameworkStartingEvent event)
public void onShutdown(PluginFrameworkShutdownEvent event)
public void onPluginUpgrade(PluginUpgradedEvent event)
public void onPluginUninstallation(PluginUninstalledEvent event)
public void onPluginFrameworkWarmRestarting(PluginFrameworkWarmRestartingEvent event)
public void start()
throws OsgiContainerException
OsgiContainerManager
start in interface OsgiContainerManagerOsgiContainerException - If the container cannot be started
public void stop()
throws OsgiContainerException
OsgiContainerManager
stop in interface OsgiContainerManagerOsgiContainerException - If the container cannot be stoppedpublic org.osgi.framework.Bundle[] getBundles()
OsgiContainerManager
getBundles in interface OsgiContainerManagerpublic org.osgi.framework.ServiceReference[] getRegisteredServices()
OsgiContainerManager
getRegisteredServices in interface OsgiContainerManagerpublic org.osgi.util.tracker.ServiceTracker getServiceTracker(java.lang.String interfaceClassName)
OsgiContainerManagerServiceTracker instance for every call, so don't call more than necessary. Any provided
ServiceTracker instances will be opened before returning and automatically closed on shutdown.
getServiceTracker in interface OsgiContainerManagerinterfaceClassName - The interface class as a String
public org.osgi.util.tracker.ServiceTracker getServiceTracker(java.lang.String interfaceClassName,
org.osgi.util.tracker.ServiceTrackerCustomizer serviceTrackerCustomizer)
OsgiContainerManagerServiceTrackerCustomizer attached for customizing tracked service objects. Will return a new
ServiceTracker instance for every call, so don't call more than necessary. Any provided
ServiceTracker instances will be opened before returning and automatically closed on shutdown.
getServiceTracker in interface OsgiContainerManagerinterfaceClassName - The interface class as a StringserviceTrackerCustomizer - service tracker customizer for the created service tracker
public org.osgi.framework.Bundle installBundle(java.io.File file)
throws OsgiContainerException
OsgiContainerManager
installBundle in interface OsgiContainerManagerfile - The bundle file to install
OsgiContainerException - If the bundle cannot be loaded
public org.osgi.framework.Bundle installBundle(java.io.File file,
boolean allowReference)
throws OsgiContainerException
OsgiContainerManager.AllowsReferenceInstall
installBundle in interface OsgiContainerManager.AllowsReferenceInstallfile - The bundle file to install.allowReference - true iff the file need not be copied, and the container may install
a reference to it.
OsgiContainerException - If the bundle cannot be loadedpublic boolean isRunning()
isRunning in interface OsgiContainerManagerpublic 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 | |||||||||