Package ai.libs.jaicore.ml.scikitwrapper
Class DefaultProcessListener
- java.lang.Object
-
- ai.libs.jaicore.ml.scikitwrapper.AProcessListener
-
- ai.libs.jaicore.ml.scikitwrapper.DefaultProcessListener
-
- All Implemented Interfaces:
IProcessListener
public class DefaultProcessListener extends AProcessListener
The DefaultProcessListener might be used to forward any type of outputs of a process to a logger.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanverboseFlag whether standard outputs are forwarded to the logger.
-
Constructor Summary
Constructors Constructor Description DefaultProcessListener(boolean verbose)Constructor to initialize the DefaultProcessListener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleError(java.lang.String error)Handle the output of the error output stream.voidhandleInput(java.lang.String input)Handle the output of the standard output stream.-
Methods inherited from class ai.libs.jaicore.ml.scikitwrapper.AProcessListener
listenTo
-
-
-
-
Method Detail
-
handleError
public void handleError(java.lang.String error)
Description copied from class:AProcessListenerHandle the output of the error output stream.- Specified by:
handleErrorin classAProcessListener- Parameters:
error- The line sent by the process via the error stream.
-
handleInput
public void handleInput(java.lang.String input) throws java.io.IOException, java.lang.InterruptedExceptionDescription copied from class:AProcessListenerHandle the output of the standard output stream.- Specified by:
handleInputin classAProcessListener- Throws:
java.io.IOException- An IOException is thrown if there is an issue reading from the process's stream.java.lang.InterruptedException- An interrupted exception is thrown if the thread/process is interrupted while processing the standard output messages.
-
-