|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.file.ArchiveUtils
public class ArchiveUtils
Nested Class Summary | |
---|---|
static enum |
ArchiveUtils.ArchiveType
The types of archive that are supported by Brooklyn. |
Field Summary | |
---|---|
static int |
NUM_RETRIES_FOR_COPYING
Number of attempts when copying a file to a remote server. |
Method Summary | |
---|---|
static void
|
deploy(java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir)
Deploys an archive file to a remote machine and extracts the contents. |
static void
|
deploy(java.util.Map props, java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir)
Deploys an archive file to a remote machine and extracts the contents. |
static void
|
deploy(java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir, java.lang.String destFile)
Deploys an archive file to a remote machine and extracts the contents. |
static void
|
deploy(java.util.Map props, java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir, java.lang.String destFile)
|
static void
|
deploy(java.util.Map props, java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String tmpDir, java.lang.String destDir, java.lang.String destFile)
Deploys an archive file to a remote machine and extracts the contents. |
static java.util.List
|
extractCommands(java.lang.String fileName, java.lang.String sourceDir, java.lang.String targetDir, boolean extractJar)
Returns the list of commands used to extract the contents of the archive with the given name. |
static java.util.List
|
extractCommands(java.lang.String fileName, java.lang.String sourceDir)
Returns the list of commands used to extract the contents of the archive with the given name. |
static int
|
install(SshMachineLocation machine, java.lang.String urlToInstall, java.lang.String target)
Installs a URL onto a remote machine. |
static int
|
install(java.util.Map props, SshMachineLocation machine, java.lang.String urlToInstall, java.lang.String target, int numAttempts)
Installs a URL onto a remote machine. |
static java.util.List
|
installCommands(java.lang.String fileName)
Returns the list of commands used to install support for an archive with the given name. |
static java.lang.String
|
readFullyString(java.io.File sourceFile)
Copies the entire contents of a file to a String. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
public static final int NUM_RETRIES_FOR_COPYING
Method Detail |
---|
public static void deploy(java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir)
public static void deploy(java.util.Map props, java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir)
Copies the archive file from the given URL to the destination directory and extracts the contents. If the URL is a local directory, the contents are packaged as a Zip archive first.
public static void deploy(java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir, java.lang.String destFile)
Copies the archive file from the given URL to a file in the destination directory and extracts the contents.
public static void deploy(java.util.Map props, java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String destDir, java.lang.String destFile)
public static void deploy(java.util.Map props, java.lang.String archiveUrl, SshMachineLocation machine, java.lang.String tmpDir, java.lang.String destDir, java.lang.String destFile)
Copies the archive file from the given URL to a file in a temporary directory and extracts
the contents in the destination directory. For Java archives of type .jar
,
.war
or .ear
the file is simply copied.
public static java.util.List extractCommands(java.lang.String fileName, java.lang.String sourceDir, java.lang.String targetDir, boolean extractJar)
Optionally, Java archives of type
public static java.util.List extractCommands(java.lang.String fileName, java.lang.String sourceDir)
The archive will be extracted in its current directory unless it is a Java archive of type .jar
,
.war
or .ear
, which will be left as is.
public static int install(SshMachineLocation machine, java.lang.String urlToInstall, java.lang.String target)
public static int install(java.util.Map props, SshMachineLocation machine, java.lang.String urlToInstall, java.lang.String target, int numAttempts)
public static java.util.List installCommands(java.lang.String fileName)
public static java.lang.String readFullyString(java.io.File sourceFile)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.