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 String
private static final int
private final BlockingQueue<String>
private final ThreadedStreamConsumer.Pumper
private final AtomicBoolean
private final Thread
-
Constructor Summary
ConstructorsConstructorDescriptionThreadedStreamConsumer
(org.apache.maven.shared.utils.cli.StreamConsumer target) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
private boolean
shouldStopQueueing
(String item) Compared item withEND_ITEM
by 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:
consumeLine
in interfaceorg.apache.maven.shared.utils.cli.StreamConsumer
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
shouldStopQueueing
Compared item withEND_ITEM
by identity.- Parameters:
item
- element fromitems
- Returns:
true
if tail of the queue
-