public interface OsgiContainerManager
| Modifier and Type | Method and Description |
|---|---|
void |
addBundleListener(org.osgi.framework.BundleListener listener)
That is shortcut to access SystemBundle.
|
org.osgi.framework.Bundle[] |
getBundles()
Gets a list of installed bundles
|
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(String interfaceClassName)
Gets a service tracker to follow a service registered under a certain interface.
|
org.osgi.util.tracker.ServiceTracker |
getServiceTracker(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(File file,
ReferenceMode referenceMode)
Installs a bundle into a running OSGI container.
|
boolean |
isRunning() |
void |
removeBundleListener(org.osgi.framework.BundleListener listener)
That is shortcut to access SystemBundle.
|
void |
start()
Starts the OSGi container
|
void |
stop()
Stops the OSGi container
|
void start()
throws OsgiContainerException
OsgiContainerException - If the container cannot be startedvoid stop() throws OsgiContainerException
OsgiContainerException - If the container cannot be stoppedorg.osgi.framework.Bundle installBundle(File file, ReferenceMode referenceMode) throws OsgiContainerException
file - The bundle file to install.referenceMode - specifies whether the container may install a reference to, rather than copy, the bundle file.OsgiContainerException - If the bundle cannot be loadedboolean isRunning()
org.osgi.framework.Bundle[] getBundles()
org.osgi.framework.ServiceReference[] getRegisteredServices()
List<HostComponentRegistration> getHostComponentRegistrations()
org.osgi.util.tracker.ServiceTracker getServiceTracker(String interfaceClassName)
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.interfaceClassName - The interface class as a StringIllegalStateException - If the OSGi container is not runningorg.osgi.util.tracker.ServiceTracker getServiceTracker(String interfaceClassName, org.osgi.util.tracker.ServiceTrackerCustomizer serviceTrackerCustomizer)
ServiceTrackerCustomizer 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.interfaceClassName - The interface class as a StringserviceTrackerCustomizer - service tracker customizer for the created service trackerIllegalStateException - If the OSGi container is not runningvoid addBundleListener(org.osgi.framework.BundleListener listener)
void removeBundleListener(org.osgi.framework.BundleListener listener)
Copyright © 2019 Atlassian. All rights reserved.