public class BundlesInstaller extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_STATE |
Constructor and Description |
---|
BundlesInstaller(OsgiConsoleClient cc) |
Modifier and Type | Method and Description |
---|---|
void |
installBundles(List<File> toInstall,
boolean startBundles)
Install a list of bundles supplied as Files
|
boolean |
isInstalled(File bundleFile)
Checks if a bundle is installed or not.
|
boolean |
isInstalledWithSameVersion(File bundleFile)
Check if the installed version matches the one of the bundle (file)
|
void |
startAllBundles(List<String> symbolicNames,
int timeout)
Start all the bundles in a {{List}}
|
void |
uninstallBundles(List<File> toUninstall)
Uninstall a list of bundles supplied as Files
|
void |
waitBundlesInstalled(List<String> symbolicNames,
long timeout)
Wait for multiple bundles to be installed in the OSGi web console.
|
boolean |
waitForBundlesInstalled(List<String> symbolicNames,
int timeoutSeconds)
Deprecated.
|
public static final String ACTIVE_STATE
public BundlesInstaller(OsgiConsoleClient cc)
public boolean isInstalled(File bundleFile) throws ClientException
bundleFile
- bundle fileClientException
- if the state of the bundle could not be determinedpublic boolean isInstalledWithSameVersion(File bundleFile) throws ClientException, IOException
bundleFile
- bundle fileClientException
- if the installed version cannot be retrievedIOException
- if the file version cannot be readpublic void installBundles(List<File> toInstall, boolean startBundles) throws ClientException, IOException
toInstall
- list ob bundles to installstartBundles
- whether to start the bundlesClientException
- if an error occurs during installationIOException
- if reading the file failspublic void uninstallBundles(List<File> toUninstall) throws ClientException, IOException
toUninstall
- bundles to uninstallClientException
- if one of the requests failedIOException
- if the files cannot be read from disk@Deprecated public boolean waitForBundlesInstalled(List<String> symbolicNames, int timeoutSeconds) throws ClientException, InterruptedException
waitBundlesInstalled(List, long)
symbolicNames
- the list of names for the bundlestimeoutSeconds
- how many seconds to waitClientException
- if something went wrongInterruptedException
- if interruptedpublic void waitBundlesInstalled(List<String> symbolicNames, long timeout) throws InterruptedException, TimeoutException
symbolicNames
- the list bundles to be checkedtimeout
- max total time to wait for all bundles, in ms, before throwing TimeoutException
TimeoutException
- if the timeout was reached before all the bundles were installedInterruptedException
- to mark this operation as "waiting", callers should rethrow itpublic void startAllBundles(List<String> symbolicNames, int timeout) throws InterruptedException, TimeoutException
symbolicNames
- the list of bundles to starttimeout
- total max time to wait for all the bundles, in msTimeoutException
- if the timeout is reached before all the bundles are startedInterruptedException
- to mark this operation as "waiting", callers should rethrow itCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.