Class LineConsumerThread
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.maven.surefire.extensions.CloseableDaemonThread
-
- org.apache.maven.surefire.extensions.util.LineConsumerThread
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Runnable
,Stoppable
public final class LineConsumerThread extends CloseableDaemonThread
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.channels.ReadableByteChannel
channel
private CountdownCloseable
countdownCloseable
private boolean
disabled
private java.nio.charset.Charset
encoding
private EventHandler<java.lang.String>
eventHandler
-
Constructor Summary
Constructors Constructor Description LineConsumerThread(java.lang.String threadName, java.nio.channels.ReadableByteChannel channel, EventHandler<java.lang.String> eventHandler, CountdownCloseable countdownCloseable)
LineConsumerThread(java.lang.String threadName, java.nio.channels.ReadableByteChannel channel, EventHandler<java.lang.String> eventHandler, CountdownCloseable countdownCloseable, java.nio.charset.Charset encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
disable()
void
run()
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
encoding
private final java.nio.charset.Charset encoding
-
channel
private final java.nio.channels.ReadableByteChannel channel
-
eventHandler
private final EventHandler<java.lang.String> eventHandler
-
countdownCloseable
private final CountdownCloseable countdownCloseable
-
disabled
private volatile boolean disabled
-
-
Constructor Detail
-
LineConsumerThread
public LineConsumerThread(@Nonnull java.lang.String threadName, @Nonnull java.nio.channels.ReadableByteChannel channel, @Nonnull EventHandler<java.lang.String> eventHandler, @Nonnull CountdownCloseable countdownCloseable)
-
LineConsumerThread
public LineConsumerThread(@Nonnull java.lang.String threadName, @Nonnull java.nio.channels.ReadableByteChannel channel, @Nonnull EventHandler<java.lang.String> eventHandler, @Nonnull CountdownCloseable countdownCloseable, @Nonnull java.nio.charset.Charset encoding)
-
-