Class DefaultCommandReader
- java.lang.Object
-
- org.apache.maven.plugin.surefire.booterclient.lazytestprovider.AbstractCommandReader
-
- org.apache.maven.plugin.surefire.booterclient.lazytestprovider.DefaultCommandReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,NotifiableTestStream,org.apache.maven.surefire.extensions.CommandReader
- Direct Known Subclasses:
TestLessInputStream,TestProvidingInputStream
public abstract class DefaultCommandReader extends AbstractCommandReader
Reader stream sends commands to forked jvm std-input-stream.- Since:
- 2.19
- Author:
- Tibor Digana (tibor17)
- See Also:
Command
-
-
Constructor Summary
Constructors Constructor Description DefaultCommandReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidbeforeNextCommand()Possibly waiting for next command (seenextCommand()) unless the stream is atomically closed (seeCommandReader.isClosed()returnstrue) before this method has returned.protected booleancanContinue()Opposite toCommandReader.isClosed().protected abstract org.apache.maven.surefire.api.booter.CommandnextCommand()org.apache.maven.surefire.api.booter.CommandreadNextCommand()Used by single thread in StreamFeeder class.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.maven.plugin.surefire.booterclient.lazytestprovider.NotifiableTestStream
acknowledgeByeEventReceived, noop, provideNewTest, shutdown, skipSinceNextTest
-
-
-
-
Method Detail
-
canContinue
protected boolean canContinue()
Opposite toCommandReader.isClosed().- Returns:
trueif not closed
-
beforeNextCommand
protected void beforeNextCommand() throws java.io.IOExceptionPossibly waiting for next command (seenextCommand()) unless the stream is atomically closed (seeCommandReader.isClosed()returnstrue) before this method has returned.- Throws:
java.io.IOException- stream error while waiting for notification regarding next test required by forked jvm
-
nextCommand
protected abstract org.apache.maven.surefire.api.booter.Command nextCommand()
-
readNextCommand
public org.apache.maven.surefire.api.booter.Command readNextCommand() throws java.io.IOExceptionUsed by single thread in StreamFeeder class.- Returns:
- Throws:
java.io.IOException
-
-