Package com.bisnode.opa.process
Class OpaOutputConsumer
- java.lang.Object
-
- com.bisnode.opa.process.OpaOutputConsumer
-
public class OpaOutputConsumer extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description OpaOutputConsumer(java.lang.Process opaProcess)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>readAllLines()Reads all output line from OPA, blocks until the OPA process ends the streamjava.lang.StringreadLine()Reads the next output line from OPAvoidspawn()Consumes OPA output in another thread and enqueues each consumed line into a queue.
-
-
-
Method Detail
-
spawn
public void spawn()
Consumes OPA output in another thread and enqueues each consumed line into a queue.
-
readLine
public java.lang.String readLine()
Reads the next output line from OPA- Returns:
- Next output line from OPA, or null if there's no more output
-
readAllLines
public java.util.List<java.lang.String> readAllLines()
Reads all output line from OPA, blocks until the OPA process ends the stream- Returns:
- All outputs lines from OPA
-
-