Class ThreadedStreamConsumer

java.lang.Object
org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.maven.shared.utils.cli.StreamConsumer

public final class ThreadedStreamConsumer extends Object implements org.apache.maven.shared.utils.cli.StreamConsumer, Closeable
Knows how to reconstruct *all* the state transmitted over stdout by the forked process.
  • Field Details

  • Constructor Details

    • ThreadedStreamConsumer

      public ThreadedStreamConsumer(org.apache.maven.shared.utils.cli.StreamConsumer target)
  • Method Details

    • consumeLine

      public void consumeLine(String s)
      Specified by:
      consumeLine in interface org.apache.maven.shared.utils.cli.StreamConsumer
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • shouldStopQueueing

      private boolean shouldStopQueueing(String item)
      Compared item with END_ITEM by identity.
      Parameters:
      item - element from items
      Returns:
      true if tail of the queue