Package com.nomagic.license.utils.exec
Interface Commandline
-
- All Known Implementing Classes:
CommandlineImpl
public interface Commandline
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_TIMEOUT
Default process timeout = 1 minute
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProcessOutput
execute(java.lang.String cmd)
Execute command lineProcessOutput
execute(java.lang.String[] cmd)
Execute command lineProcessOutput
execute(java.lang.String[] cmd, java.io.File dir)
Execute command lineProcessOutput
execute(java.lang.String[] cmd, java.lang.String[] environment)
Execute command lineProcessOutput
execute(java.lang.String[] cmd, java.lang.String[] environment, java.io.File dir)
Execute command lineProcessOutput
execute(java.lang.String cmd, java.io.File dir)
Execute command lineProcessOutput
execute(java.lang.String cmd, java.lang.String[] environment)
Execute command lineProcessOutput
execute(java.lang.String cmd, java.lang.String[] environment, java.io.File dir)
Execute command linelong
getTimeout()
boolean
isLogEnabled()
void
log(java.lang.String text)
Print some log information.void
setTimeout(long timeout)
-
-
-
Field Detail
-
DEFAULT_TIMEOUT
static final long DEFAULT_TIMEOUT
Default process timeout = 1 minute- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
ProcessOutput execute(java.lang.String cmd, java.lang.String[] environment, java.io.File dir) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
dir
- file working directorycmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
execute
ProcessOutput execute(java.lang.String cmd, java.lang.String[] environment) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
cmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
execute
ProcessOutput execute(java.lang.String cmd, java.io.File dir) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
dir
- file working directorycmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
execute
ProcessOutput execute(java.lang.String cmd) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
cmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
execute
ProcessOutput execute(java.lang.String[] cmd, java.lang.String[] environment, java.io.File dir) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
dir
- file working directorycmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
execute
ProcessOutput execute(java.lang.String[] cmd, java.lang.String[] environment) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
cmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
execute
ProcessOutput execute(java.lang.String[] cmd, java.io.File dir) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
dir
- file working directorycmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
execute
ProcessOutput execute(java.lang.String[] cmd) throws java.io.IOException, java.lang.InterruptedException
Execute command line- Parameters:
cmd
- command line- Returns:
- output of command
- Throws:
java.io.IOException
java.lang.InterruptedException
-
getTimeout
long getTimeout()
- Returns:
-
setTimeout
void setTimeout(long timeout)
-
isLogEnabled
boolean isLogEnabled()
- Returns:
-
log
void log(java.lang.String text)
Print some log information.- Parameters:
text
-
-
-