|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jclouds.scriptbuilder.domain.Statements
public class Statements
Statements used in shell scripts.
| Constructor Summary | |
|---|---|
Statements()
|
|
| Method Summary | |
|---|---|
static Statement |
appendFile(String path,
Iterable<String> lines)
|
static Statement |
appendFile(String path,
Iterable<String> lines,
String delimeter)
|
static Statement |
appendFile(String path,
String line,
String delimeter)
|
static Statement |
call(String function,
String... args)
|
static Statement |
createOrOverwriteFile(String path,
Iterable<String> lines)
|
static Statement |
createOrOverwriteFile(String path,
Iterable<String> lines,
String delimeter)
|
static CreateRunScript |
createRunScript(String instanceName,
Iterable<String> exports,
String pwd,
Iterable<Statement> statements)
|
static Statement |
exec(String portableStatement)
interprets and adds a newline to the statement |
static Statement |
extractTargzIntoDirectory(String method,
URI endpoint,
com.google.common.collect.Multimap<String,String> headers,
String directory)
untar, ungzip the data received from the request parameters. |
static Statement |
extractTargzIntoDirectory(URI targz,
String directory)
|
static Statement |
extractZipIntoDirectory(String method,
URI endpoint,
com.google.common.collect.Multimap<String,String> headers,
String directory)
unzip the data received from the request parameters. |
static Statement |
findPid(String args)
Stores the pid into the variable FOUND_PID if successful. |
static Statement |
forget(String instanceName,
String script,
String logDir)
Runs the script in a way that it can be matched later with findPid(java.lang.String) |
static Statement |
interpret(String... portableStatements)
statement can have multiple newlines, note you should use lf to be
portable |
static Statement |
kill()
Kills the pid and subprocesses related to the variable FOUND_PID
if set. |
static Statement |
newStatementList(Statement... statements)
|
static Statement |
pipeHttpResponseToBash(String method,
URI endpoint,
com.google.common.collect.Multimap<String,String> headers)
exec the data received from the request parameters. |
static Statement |
rm(String path)
|
static Statement |
saveHttpResponseTo(URI source,
String dir,
String file)
|
static Statement |
switchArg(int arg,
Map<String,Statement> valueToActions)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Statements()
| Method Detail |
|---|
public static Statement newStatementList(Statement... statements)
public static Statement switchArg(int arg,
Map<String,Statement> valueToActions)
public static Statement rm(String path)
public static Statement call(String function,
String... args)
public static Statement appendFile(String path,
String line,
String delimeter)
public static Statement appendFile(String path,
Iterable<String> lines)
public static Statement appendFile(String path,
Iterable<String> lines,
String delimeter)
public static Statement createOrOverwriteFile(String path,
Iterable<String> lines)
public static Statement createOrOverwriteFile(String path,
Iterable<String> lines,
String delimeter)
public static CreateRunScript createRunScript(String instanceName,
Iterable<String> exports,
String pwd,
Iterable<Statement> statements)
public static Statement findPid(String args)
FOUND_PID if successful.
args - - what to search for in the process tree.
public static Statement forget(String instanceName,
String script,
String logDir)
findPid(java.lang.String)
instanceName - - what to match the process onscript - - what to run in the backgroundlogDir - - where to write the following logs:
public static Statement kill()
FOUND_PID
if set.
findPid(java.lang.String)public static Statement interpret(String... portableStatements)
lf to be
portable
ShellTokenpublic static Statement exec(String portableStatement)
public static Statement extractTargzIntoDirectory(String method,
URI endpoint,
com.google.common.collect.Multimap<String,String> headers,
String directory)
method - http method: ex GETendpoint - uri corresponding to the requestheaders - request headers to senddirectory -
public static Statement extractTargzIntoDirectory(URI targz,
String directory)
public static Statement extractZipIntoDirectory(String method,
URI endpoint,
com.google.common.collect.Multimap<String,String> headers,
String directory)
method - http method: ex GETendpoint - uri corresponding to the requestheaders - request headers to senddirectory -
public static Statement saveHttpResponseTo(URI source,
String dir,
String file)
public static Statement pipeHttpResponseToBash(String method,
URI endpoint,
com.google.common.collect.Multimap<String,String> headers)
method - http method: ex GETendpoint - uri corresponding to the requestheaders - request headers to send
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||