|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.common.deploy.DeployUtils
public class DeployUtils
Constructor Summary | |
---|---|
DeployUtils()
|
Method Summary | |
---|---|
static org.kuali.common.util.secure.Result |
chown(org.kuali.common.util.secure.SecureChannel channel,
String owner,
String group,
List<String> paths)
|
static void |
copyFiles(org.kuali.common.util.secure.SecureChannel channel,
List<Deployable> deployables,
Properties filterProperties)
|
static org.kuali.common.util.secure.Result |
delete(org.kuali.common.util.secure.SecureChannel channel,
List<String> paths)
|
static org.kuali.common.util.secure.Result |
executeCommand(org.kuali.common.util.secure.SecureChannel channel,
String command,
boolean validateResult)
|
static org.kuali.common.util.secure.Result |
executePathCommand(org.kuali.common.util.secure.SecureChannel channel,
String command,
List<String> paths)
|
static void |
executePathCommand(org.kuali.common.util.secure.SecureChannel channel,
String command,
String path)
|
static List<org.kuali.common.util.UnixProcess> |
getMatchingProcesses(List<org.kuali.common.util.UnixProcess> processes,
String command)
Return a list of any processes where the command exactly matches the command passed in. |
static String |
getNohupBackgroundProcess(String user,
String cmd)
Execute cmd as user using nohup and running it in the background. |
static List<String> |
getOutputLines(org.kuali.common.util.secure.Result result)
|
static org.kuali.common.util.UnixProcess |
getUnixProcess(String header,
String line)
Output looks like this: |
static List<org.kuali.common.util.UnixProcess> |
getUnixProcesses(org.kuali.common.util.secure.Result result)
Output looks like this: |
static List<org.kuali.common.util.UnixProcess> |
getUnixProcesses(org.kuali.common.util.secure.SecureChannel channel,
String user)
|
static void |
kill(org.kuali.common.util.secure.SecureChannel channel,
org.kuali.common.util.UnixProcess process)
|
static void |
killMatchingProcesses(org.kuali.common.util.secure.SecureChannel channel,
String user,
String cmd,
String processLabel)
|
protected static void |
logCopy(String src,
String dst,
long elapsed)
|
static void |
logResult(org.kuali.common.util.secure.Result result,
org.slf4j.Logger logger)
|
static void |
logResult(org.kuali.common.util.secure.Result result,
org.slf4j.Logger logger,
org.kuali.common.util.LoggerLevel level)
|
static org.kuali.common.util.secure.Result |
mkdirs(org.kuali.common.util.secure.SecureChannel channel,
List<String> paths)
|
static org.kuali.common.util.MonitorTextFileResult |
monitorTextFile(org.kuali.common.util.secure.SecureChannel channel,
String path,
String token,
int intervalMillis,
int timeoutMillis,
String encoding)
Examine the contents of a text file, stopping as soon as it contains token , or timeout is exceeded, whichever comes first. |
static org.kuali.common.util.secure.Result |
runscript(org.kuali.common.util.secure.SecureChannel channel,
String username,
String script)
|
static org.kuali.common.util.secure.Result |
runscript(org.kuali.common.util.secure.SecureChannel channel,
String username,
String script,
boolean validateExitValue)
|
static void |
validateResult(org.kuali.common.util.secure.Result result)
|
static void |
validateResult(org.kuali.common.util.secure.Result result,
List<Integer> exitValues)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeployUtils()
Method Detail |
---|
public static org.kuali.common.util.MonitorTextFileResult monitorTextFile(org.kuali.common.util.secure.SecureChannel channel, String path, String token, int intervalMillis, int timeoutMillis, String encoding)
token
, or timeout
is exceeded, whichever comes first.
public static void killMatchingProcesses(org.kuali.common.util.secure.SecureChannel channel, String user, String cmd, String processLabel)
public static String getNohupBackgroundProcess(String user, String cmd)
cmd
as user
using nohup
and running it in the background.
public static void copyFiles(org.kuali.common.util.secure.SecureChannel channel, List<Deployable> deployables, Properties filterProperties)
protected static void logCopy(String src, String dst, long elapsed)
public static List<org.kuali.common.util.UnixProcess> getMatchingProcesses(List<org.kuali.common.util.UnixProcess> processes, String command)
public static List<org.kuali.common.util.UnixProcess> getUnixProcesses(org.kuali.common.util.secure.Result result)
UID PID PPID C STIME TTY TIME CMD tomcat 15461 15460 0 22:51 pts/0 00:00:00 -bash tomcat 15480 15461 0 22:52 pts/0 00:00:02 java -jar /usr/local/machine-agent/machineagent.jar
public static org.kuali.common.util.UnixProcess getUnixProcess(String header, String line)
UID PID PPID C STIME TTY TIME CMD tomcat 15461 15460 0 22:51 pts/0 00:00:00 -bash tomcat 15480 15461 0 22:52 pts/0 00:00:02 java -jar /usr/local/machine-agent/machineagent.jar
public static org.kuali.common.util.secure.Result executeCommand(org.kuali.common.util.secure.SecureChannel channel, String command, boolean validateResult)
public static void kill(org.kuali.common.util.secure.SecureChannel channel, org.kuali.common.util.UnixProcess process)
public static List<org.kuali.common.util.UnixProcess> getUnixProcesses(org.kuali.common.util.secure.SecureChannel channel, String user)
public static org.kuali.common.util.secure.Result runscript(org.kuali.common.util.secure.SecureChannel channel, String username, String script)
public static org.kuali.common.util.secure.Result runscript(org.kuali.common.util.secure.SecureChannel channel, String username, String script, boolean validateExitValue)
public static org.kuali.common.util.secure.Result delete(org.kuali.common.util.secure.SecureChannel channel, List<String> paths)
public static org.kuali.common.util.secure.Result mkdirs(org.kuali.common.util.secure.SecureChannel channel, List<String> paths)
public static org.kuali.common.util.secure.Result chown(org.kuali.common.util.secure.SecureChannel channel, String owner, String group, List<String> paths)
public static void executePathCommand(org.kuali.common.util.secure.SecureChannel channel, String command, String path)
public static org.kuali.common.util.secure.Result executePathCommand(org.kuali.common.util.secure.SecureChannel channel, String command, List<String> paths)
public static List<String> getOutputLines(org.kuali.common.util.secure.Result result)
public static void logResult(org.kuali.common.util.secure.Result result, org.slf4j.Logger logger, org.kuali.common.util.LoggerLevel level)
public static void logResult(org.kuali.common.util.secure.Result result, org.slf4j.Logger logger)
public static void validateResult(org.kuali.common.util.secure.Result result)
public static void validateResult(org.kuali.common.util.secure.Result result, List<Integer> exitValues)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |