Class 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 stream
      java.lang.String readLine()
      Reads the next output line from OPA
      void spawn()
      Consumes OPA output in another thread and enqueues each consumed line into a queue.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OpaOutputConsumer

        public OpaOutputConsumer​(java.lang.Process opaProcess)
    • 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