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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final intprivate final BlockingQueue<String>private final ThreadedStreamConsumer.Pumperprivate final AtomicBooleanprivate final Thread -
Constructor Summary
ConstructorsConstructorDescriptionThreadedStreamConsumer(org.apache.maven.shared.utils.cli.StreamConsumer target) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidprivate booleanshouldStopQueueing(String item) Compared item withEND_ITEMby identity.
-
Field Details
-
END_ITEM
- See Also:
-
ITEM_LIMIT_BEFORE_SLEEP
private static final int ITEM_LIMIT_BEFORE_SLEEP- See Also:
-
items
-
stop
-
thread
-
pumper
-
-
Constructor Details
-
Method Details
-
consumeLine
- Specified by:
consumeLinein interfaceorg.apache.maven.shared.utils.cli.StreamConsumer
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
shouldStopQueueing
Compared item withEND_ITEMby identity.- Parameters:
item- element fromitems- Returns:
trueif tail of the queue
-