public class PluginUpdate extends Object
getCurrentPluginFiles().| Constructor and Description |
|---|
PluginUpdate(CoreServerService core_server_service,
PluginContainerConfiguration config)
Constructor for
PluginUpdate. |
PluginUpdate(PluginContainerConfiguration config)
Constructor for
PluginUpdate that can only be used to get info on current plugins; calling
updatePlugins() on the object will fail. |
| Modifier and Type | Method and Description |
|---|---|
List<File> |
getCurrentPluginFiles()
Returns the list of all the plugin archive files.
|
PluginContainerConfiguration |
getPluginContainerConfiguration() |
static boolean |
isCurrentlyUpdating(PluginContainerConfiguration config)
All
PluginUpdate objects know if they are currently updating plugins given a specific
config. |
List<org.rhq.core.domain.plugin.Plugin> |
updatePlugins()
This will compare the current set of plugins that exist locally with the set of latest plugins that are available
from the core server service.
|
static boolean |
waitForUpdateToComplete(PluginContainerConfiguration config,
long timeout)
Blocks the calling thread for a maximum of the given amount of milliseconds timeout waiting for a plugin update
to completely.
|
public PluginUpdate(CoreServerService core_server_service, PluginContainerConfiguration config)
PluginUpdate. You can pass in a null core_server_service if you
only plan to use this object to obtain information on the currently installed plugins and not actually update
them.core_server_service - the server that is to be used to retrieve the latest pluginsconfig - the plugin container configuration used to find what current plugins exist locallypublic PluginUpdate(PluginContainerConfiguration config)
PluginUpdate that can only be used to get info on current plugins; calling
updatePlugins() on the object will fail. you can only call getCurrentPluginFiles().config - the plugin container configuration used to find what current plugins exist locallypublic static boolean isCurrentlyUpdating(PluginContainerConfiguration config)
PluginUpdate objects know if they are currently updating plugins given a specific
config. Call this static method to ask if any plugin update object is currently updating plugins with the
given configurationconfig - used to determine where the plugins are being updatedtrue if a plugin updater object is currently updating plugin; false if all
plugins are up-to-date and nothing is being updated anymore.public static boolean waitForUpdateToComplete(PluginContainerConfiguration config, long timeout) throws InterruptedException
config - used to determine where the plugins are being updatedtimeout - max milliseconds to waittrue if a plugin updater object is currently updating plugin and this method timed out;
false if all plugins are up-to-date and nothing is being updated anymore.InterruptedException - if thread was interrupted while waitingpublic PluginContainerConfiguration getPluginContainerConfiguration()
public List<org.rhq.core.domain.plugin.Plugin> updatePlugins() throws Exception
You can only call this method if a valid, non-null CoreServerService implementation was
given to this object's constructor.
Exception - if failed to determine our current set of plugins due to the inability to calculate their MD5
hashcodes or failed to download a pluginCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.