public class AgentUpdateDownload extends Object
| Constructor and Description |
|---|
AgentUpdateDownload(AgentMain agent) |
| Modifier and Type | Method and Description |
|---|---|
void |
download()
Downloads the agent update binary and stores it to the local file system.
|
File |
getAgentUpdateBinaryFile()
If the agent update binary has been
downloaded, this will return
the file where the downloaded content was stored. |
AgentUpdateVersion |
getAgentUpdateVersion() |
URL |
getDownloadUrl()
Returns the URL that will be accessed to download the agent update binary.
|
File |
getLocalDownloadDirectory()
Returns the location on the local file system where any downloaded
files will be stored.
|
void |
validate()
This will validate the MD5 of the
downloaded binary file. |
public AgentUpdateDownload(AgentMain agent)
public AgentUpdateVersion getAgentUpdateVersion()
public URL getDownloadUrl() throws Exception
Exception - if for some reason a valid URL could not be obtainedpublic File getAgentUpdateBinaryFile()
downloaded, this will return
the file where the downloaded content was stored.null if it was
never downloadedpublic File getLocalDownloadDirectory()
public void validate()
throws Exception
downloaded binary file.
If it validates, this method returns normally, otherwise, an exception is thrown.
You must first download the file first before calling this method.Exception - if the downloaded agent update binary file does not validate with the expected
MD5, or the agent update binary has not been downloaded yet.Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.