java.lang.Object
com.tlcsdm.core.powershell.PowerShellCommandProcessor
Processor used to send commands to PowerShell console.
It works as an independent thread and its results are collected using the Future interface.
- 作者:
- Javier Garcia Alonso
-
字段概要
字段 -
构造器概要
构造器构造器说明PowerShellCommandProcessor(String name, InputStream inputStream, int waitPause) Constructor that takes the output and the input of the PowerShell session -
方法概要
修饰符和类型方法说明call()Calls the command and returns its outputprivate booleanvoidclose()Closes the command processor, canceling the current work if not finishprivate voidreadData(StringBuilder powerShellOutput) private boolean
-
字段详细资料
-
reader
-
closed
private boolean closed -
waitPause
private final int waitPause
-
-
构造器详细资料
-
PowerShellCommandProcessor
Constructor that takes the output and the input of the PowerShell session- 参数:
name- the name of the CommandProcessorinputStream- the stream needed to read the command outputwaitPause- long the wait pause in milliseconds
-
-
方法详细资料
-
call
Calls the command and returns its output- 指定者:
call在接口中Callable<String>- 返回:
- String output of call
- 抛出:
InterruptedException- error when reading data
-
readData
- 抛出:
IOException
-
startReading
-
canContinueReading
-
close
public void close()Closes the command processor, canceling the current work if not finish
-