Package org.refcodes.runtime
Class ProcessResult
- java.lang.Object
-
- org.refcodes.runtime.ProcessResult
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ResultAccessor
org.refcodes.mixin.ResultAccessor.ResultBuilder<RES extends Object,B extends org.refcodes.mixin.ResultAccessor.ResultBuilder<RES,B>>, org.refcodes.mixin.ResultAccessor.ResultMutator<RES extends Object>, org.refcodes.mixin.ResultAccessor.ResultProperty<RES extends Object>
-
-
Constructor Summary
Constructors Constructor Description ProcessResult(Process aProcess)Constructs aProcessResultinstance which will synchronously return the process' result viagetResult()(andtoString()accordingly).ProcessResult(Process aProcess, int aTimeOutMillis)Constructs aProcessResultinstance which will synchronously return the process' result viagetResult()(andtoString()accordingly).
-
-
-
Constructor Detail
-
ProcessResult
public ProcessResult(Process aProcess) throws IOException
Constructs aProcessResultinstance which will synchronously return the process' result viagetResult()(andtoString()accordingly).- Parameters:
aProcess- TheProcessfrom which to retrieve the result.- Throws:
IOException- Thrown in case there were problems retrieving the result. If possible, the error stream of the process is captured in the exception's message.
-
ProcessResult
public ProcessResult(Process aProcess, int aTimeOutMillis) throws InterruptedException, IOException
Constructs aProcessResultinstance which will synchronously return the process' result viagetResult()(andtoString()accordingly).- Parameters:
aProcess- TheProcessfrom which to retrieve the result.aTimeOutMillis- The time to wait till to terminate with anInterruptedException.- Throws:
IOException- Thrown in case there were problems retrieving the result. If possible, the error stream of the process is capturedInterruptedException- Thrown in case the timeout has exceeded before process' termination.
-
-