org.apache.maven.plugin.surefire.booterclient.lazytestprovider
Class TestProvidingInputStream
java.lang.Object
java.io.InputStream
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestProvidingInputStream
- All Implemented Interfaces:
- Closeable
public class TestProvidingInputStream
- extends InputStream
An InputStream that, when read, provides test class names out of a queue.
The Stream provides only one test at a time, but only after provideNewTest() has been invoked.
After providing each test class name, followed by a newline character, a flush is performed on the
FlushReceiver provided by the FlushReceiverProvider that can be set using
setFlushReceiverProvider(FlushReceiverProvider).
- Author:
- Andreas Gudian
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestProvidingInputStream
public TestProvidingInputStream(Queue<String> testItemQueue)
- C'tor
- Parameters:
testItemQueue - source of the tests to be read from this stream
setFlushReceiverProvider
public void setFlushReceiverProvider(FlushReceiverProvider flushReceiverProvider)
- Parameters:
flushReceiverProvider - the provider for a flush receiver.
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
provideNewTest
public void provideNewTest()
- Signal that a new test is to be provided.
close
public void close()
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.