|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.agent.PluginUpdate
public class PluginUpdate
This object's job is to update any and all plugin jars that need to be updated. If this object determines that a
more recent plugin jar exists, this will retrieve it and overwrite the current plugin jar with that latest plugin
jar. This object can also be used if you just want to get information on the current set of plugins - see
getCurrentPluginFiles().
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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<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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 locally| Method Detail |
|---|
public 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 configuration
config - used to determine where the plugins are being updated
true 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 wait
true 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<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 pluginpublic List<File> getCurrentPluginFiles()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||