BundleCacheManager MBean

Partial ObjectName:
WebSphere:*,type=BundleCacheManager


MBean BundleCacheManager

Use the OSGi bundle cache manager MBean to interact with bundles that are in the bundle cache. The bundle cache is a local directory that contains bundles that are referenced by OSGi applications, and have been downloaded from both internal and external repositories.


Operation Summary
java.lang.BooleanareAllDownloadsComplete()
           Returns true if all bundles have been successfully downloaded.
voiddownloadBundles()
           Triggers the process to start downloading any bundles for which there are outstanding bundle download requests.
java.util.ListgetAllBundles()
           Returns a List of Strings containing all known bundle names.
java.util.CollectiongetTokensForBundle(java.lang.String bundleName)
           Returns a Collection of Strings containing all assets that are using the specified bundle.
java.lang.StringgetBundleDownloadState(java.lang.String bundleName)
           Returns a string that indicates the current download state for the specified bundle.
java.lang.IntegergetBundleDownloadStatus(java.lang.String bundleName)
           Returns the size, in bytes, of the bundle in the bundle cache.
java.net.URLgetBundleLocationURL(java.lang.String bundleName)
           Returns a URL object containing the location of the specified bundle.
java.lang.LonggetBundleSize(java.lang.String bundleName)
           Returns the size of the bundle in the repository, or -1 if the size is not known.
java.util.ListgetDownloadingBundles()
           Returns a List of Strings containing the bundle names of bundles that are currently being downloaded.
java.util.ListgetDownloadedBundles()
           Returns a List of Strings containing the bundle names of bundles that have successfully downloaded.
java.util.CollectiongetDownloadExceptions(java.lang.String bundleName)
           Returns a Collection of Strings containing any exceptions that are issued during the bundle download.
java.util.ListgetFailedBundleDownloads()
           Returns a List of Strings containing the bundle names of bundles that have failed to download.
voiddiscardUnconfirmedBundles()
           Internal Use Only.
java.lang.BooleanhasBundleDownloadBeenRequested(java.lang.String bundleName)
           Returns a boolean value indicating whether a bundle download request has already been made for the specified bundle name.
java.lang.BooleanisBundleDownloadComplete(java.lang.String bundleName)
           Returns a boolean value indicating whether the specified bundle has successfully downloaded.
java.lang.BooleanredownloadBundle(java.lang.String bundleName)
           Triggers the process to start downloading the specified bundle.
java.lang.BooleanremoveBundleFromCache(java.lang.String bundleName)
           Removes the bundle from the bundle cache directory.
voidrequestBundleDownload(java.lang.String bundleName, java.net.URL remoteRepositoryURL)
           Requests that the specified bundle is downloaded the next time the downloadBundles method on this MBean is called.
voidresetBundleDownload(java.lang.String bundleName)
           Resets the state of the specified bundle.
java.net.URLrefreshBundleLocationURL(java.lang.String bundleName)
           Refreshes the URL of the specified bundle from the loaded bundle repositories.

Operation Detail

areAllDownloadsComplete

public java.lang.Boolean areAllDownloadsComplete()
Returns true if all bundles have been successfully downloaded. Returns false if there are bundles that are either being downloaded, waiting to be downloaded, or whose download has failed.
Security Roles:
administrator
operator

downloadBundles

public void downloadBundles()
Triggers the process to start downloading any bundles for which there are outstanding bundle download requests.
Security Roles:
administrator
operator

getAllBundles

public java.util.List getAllBundles()
Returns a List of Strings containing all known bundle names.
Security Roles:
administrator
operator

getTokensForBundle

public java.util.Collection getTokensForBundle(java.lang.String bundleName)
Returns a Collection of Strings containing all assets that are using the specified bundle.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

getBundleDownloadState

public java.lang.String getBundleDownloadState(java.lang.String bundleName)
Returns a string that indicates the current download state for the specified bundle.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

getBundleDownloadStatus

public java.lang.Integer getBundleDownloadStatus(java.lang.String bundleName)
Returns the size, in bytes, of the bundle in the bundle cache. If the bundle is being downloaded, this method can be used to determine how much of the file has been downloaded.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

getBundleLocationURL

public java.net.URL getBundleLocationURL(java.lang.String bundleName)
Returns a URL object containing the location of the specified bundle.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

getBundleSize

public java.lang.Long getBundleSize(java.lang.String bundleName)
Returns the size of the bundle in the repository, or -1 if the size is not known.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

getDownloadingBundles

public java.util.List getDownloadingBundles()
Returns a List of Strings containing the bundle names of bundles that are currently being downloaded.
Security Roles:
administrator
operator

getDownloadedBundles

public java.util.List getDownloadedBundles()
Returns a List of Strings containing the bundle names of bundles that have successfully downloaded.
Security Roles:
administrator
operator

getDownloadExceptions

public java.util.Collection getDownloadExceptions(java.lang.String bundleName)
Returns a Collection of Strings containing any exceptions that are issued during the bundle download.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

getFailedBundleDownloads

public java.util.List getFailedBundleDownloads()
Returns a List of Strings containing the bundle names of bundles that have failed to download.
Security Roles:
administrator
operator

discardUnconfirmedBundles

public void discardUnconfirmedBundles()
Internal Use Only.
Security Roles:
administrator
operator

hasBundleDownloadBeenRequested

public java.lang.Boolean hasBundleDownloadBeenRequested(java.lang.String bundleName)
Returns a boolean value indicating whether a bundle download request has already been made for the specified bundle name.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is<bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

isBundleDownloadComplete

public java.lang.Boolean isBundleDownloadComplete(java.lang.String bundleName)
Returns a boolean value indicating whether the specified bundle has successfully downloaded.
Parameters:
bundleName - The name of the bundle to query. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

redownloadBundle

public java.lang.Boolean redownloadBundle(java.lang.String bundleName)
Triggers the process to start downloading the specified bundle.
Parameters:
bundleName - The name of the bundle to re-download. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

removeBundleFromCache

public java.lang.Boolean removeBundleFromCache(java.lang.String bundleName)
Removes the bundle from the bundle cache directory.
Parameters:
bundleName - The name of the bundle to remove. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

requestBundleDownload

public void requestBundleDownload(java.lang.String bundleName, java.net.URL remoteRepositoryURL)
Requests that the specified bundle is downloaded the next time the downloadBundles method on this MBean is called.
Parameters:
bundleName - The name of the bundle to download. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
remoteRepositoryURL - The external repository URL to download the bundle from.
Security Roles:
administrator
operator

resetBundleDownload

public void resetBundleDownload(java.lang.String bundleName)
Resets the state of the specified bundle. This can be used to reset the state of a failed bundle, so that the download of the bundle will be re-attempted when any outstanding bundle download requests are processed.
Parameters:
bundleName - The name of the bundle to reset. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

refreshBundleLocationURL

public java.net.URL refreshBundleLocationURL(java.lang.String bundleName)
Refreshes the URL of the specified bundle from the loaded bundle repositories. Returns the URL, or null if no repository can be found.
Parameters:
bundleName - The name of the bundle whose bundle location you want to update. The format of the bundle name is <bundle Symbolic Name>_<bundle version>.jar.
Security Roles:
administrator
operator

Copyright IBM Corporation 2002, 2012