Package com.intuit.karate.shell
Class Command
java.lang.Object
java.lang.Thread
com.intuit.karate.shell.Command
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean force) static Stringstatic Stringintstatic intgetFreePort(int preferred) booleanisFailed()static String[]prefixShellArgs(String[] args) voidrun()voidsetEnvironment(Map<String, String> environment) voidsetErrorListener(Consumer<String> errorListener) voidsetListener(Consumer<String> listener) voidsetPollAttempts(int pollAttempts) voidsetPollInterval(int pollInterval) voidsetRedirectErrorStream(boolean redirectErrorStream) static String[]static booleanwaitForHttp(String url) static booleanwaitForHttp(String url, Predicate<Response> condition) booleanwaitForPort(String host, int port) static booleanwaitForSocket(int port) intwaitSync()Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
Command
-
Command
-
Command
-
-
Method Details
-
setPollAttempts
public void setPollAttempts(int pollAttempts) -
setPollInterval
public void setPollInterval(int pollInterval) -
isFailed
public boolean isFailed() -
getFailureReason
-
setEnvironment
-
setListener
-
setErrorListener
-
setRedirectErrorStream
public void setRedirectErrorStream(boolean redirectErrorStream) -
getSysOut
-
getSysErr
-
exec
-
tokenize
-
execLine
-
prefixShellArgs
-
getFreePort
public static int getFreePort(int preferred) -
waitForPort
-
waitForHttp
-
waitForHttp
-
waitForSocket
public static boolean waitForSocket(int port) -
getEnvironment
-
getWorkingDir
-
getArgList
-
getLogger
-
getAppender
-
getUniqueName
-
getExitCode
public int getExitCode() -
waitSync
public int waitSync() -
close
public void close(boolean force) -
run
public void run()
-