public abstract class AbstractTask
extends org.apache.tools.ant.Task
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_LOG_FILE |
protected static String |
DEFAULT_SERVER |
protected File |
installDir |
protected static boolean |
isWindows |
protected static ResourceBundle |
messages |
protected static String |
osName |
protected File |
outputDir |
protected ProcessBuilder |
processBuilder |
protected String |
ref |
protected File |
serverConfigDir |
protected String |
serverName |
protected File |
serverOutputDir |
protected File |
userDir |
protected static String |
WLP_OUTPUT_DIR_VAR |
protected static String |
WLP_USER_DIR_VAR |
| Constructor and Description |
|---|
AbstractTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkReturnCode(Process p,
String commandLine,
int... expectedExitCodes) |
protected String |
findStringInFile(String regexp,
File fileToSearch)
Searches the given file for the given regular expression.
|
protected List<String> |
findStringsInFileCommon(String regexp,
boolean stopOnFirst,
int searchLimit,
File fileToSearch)
Searches the given file for the given regular expression.
|
protected String |
getFileName(String fileName) |
File |
getInstallDir() |
File |
getLogFile() |
protected String |
getMessage(String key,
Object... args) |
File |
getOutputDir() |
String |
getRef() |
protected int |
getReturnCode(Process p,
String commandLine) |
String |
getServerName() |
File |
getUserDir() |
protected void |
initTask() |
void |
setInstallDir(File installDir) |
void |
setOutputDir(File outputDir) |
void |
setRef(String ref) |
void |
setServerName(String serverName) |
void |
setUserDir(File userDir) |
protected void |
stopServer(String timeout) |
String |
waitForStringInLog(String regexp,
long timeout,
File outputFile)
Check for a number of strings in a potentially remote file
|
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeprotected File installDir
protected File userDir
protected File outputDir
protected File serverConfigDir
protected File serverOutputDir
protected String serverName
protected String ref
protected static String osName
protected static boolean isWindows
protected ProcessBuilder processBuilder
protected static final String DEFAULT_SERVER
protected static final String DEFAULT_LOG_FILE
protected static final String WLP_USER_DIR_VAR
protected static final String WLP_OUTPUT_DIR_VAR
protected static final ResourceBundle messages
protected void initTask()
public File getInstallDir()
public void setInstallDir(File installDir)
public File getUserDir()
public void setUserDir(File userDir)
public File getOutputDir()
public void setOutputDir(File outputDir)
public String getServerName()
public void setServerName(String serverName)
serverName - the serverName to setpublic File getLogFile()
public String getRef()
public void setRef(String ref)
ref - the ref to setprotected int getReturnCode(Process p, String commandLine) throws InterruptedException
InterruptedExceptionpublic void checkReturnCode(Process p, String commandLine, int... expectedExitCodes) throws InterruptedException
InterruptedExceptionpublic String waitForStringInLog(String regexp, long timeout, File outputFile)
regexp - a regular expression to search fortimeout - a timeout, in millisecondsoutputFile - file to checkprotected String findStringInFile(String regexp, File fileToSearch) throws Exception
regexp - a regular expression (or just a text snippet) to search forfileToSearch - the file to searchExceptionprotected List<String> findStringsInFileCommon(String regexp, boolean stopOnFirst, int searchLimit, File fileToSearch) throws Exception
regexp - a regular expression (or just a text snippet) to search forfileToSearch - the file to searchExceptionprotected void stopServer(String timeout)
Copyright © 2018 the original author or authors.