Package org.apache.maven.surefire.stream
Class EventDecoder
java.lang.Object
org.apache.maven.surefire.api.stream.AbstractStreamDecoder<Event,ForkedProcessEventType,SegmentType>
org.apache.maven.surefire.stream.EventDecoder
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.maven.surefire.api.stream.AbstractStreamDecoder
AbstractStreamDecoder.BufferedStream, AbstractStreamDecoder.MalformedFrameException, AbstractStreamDecoder.Memento, AbstractStreamDecoder.Segment, AbstractStreamDecoder.StreamReadStatus -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final OutputStreamprivate static final SegmentType[]private static final Map<AbstractStreamDecoder.Segment, ForkedProcessEventType> private static final SegmentType[]private static final SegmentType[]private static final SegmentType[]private static final SegmentType[]private static final SegmentType[]private static final intprivate static final Map<AbstractStreamDecoder.Segment, RunMode> Fields inherited from class org.apache.maven.surefire.api.stream.AbstractStreamDecoder
BUFFER_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voiddebugStream(byte[] array, int position, int remaining) protected final byte[]private OutputStreamnewDebugSink(ForkNodeArguments arguments) (package private) static TestSetReportEntrynewReportEntry(RunMode runMode, long testRunId, String source, String sourceText, String name, String nameText, String group, String message, Integer timeElapsed, String traceMessage, String smartTrimmedStackTrace, String stackTrace) protected final SegmentType[]nextSegmentType(ForkedProcessEventType eventType) private static Map<AbstractStreamDecoder.Segment, ForkedProcessEventType> private static Map<AbstractStreamDecoder.Segment, RunMode> protected final EventtoMessage(ForkedProcessEventType eventType, AbstractStreamDecoder<Event, ForkedProcessEventType, SegmentType>.Memento memento) private static TestSetReportEntrytoReportEntry(List<Object> args) private static StackTraceWritertoStackTraceWriter(List<Object> args) private static StackTraceWriterMethods inherited from class org.apache.maven.surefire.api.stream.AbstractStreamDecoder
checkArguments, checkDelimiter, checkHeader, getArguments, printRemainingStream, read, readByte, readCharset, readInt, readInteger, readLong, readLongPrivate, readMessageType, readSegment, readString
-
Field Details
-
DEBUG_SINK_BUFFER_SIZE
private static final int DEBUG_SINK_BUFFER_SIZE- See Also:
-
EVENT_TYPES
-
RUN_MODES
-
EVENT_WITHOUT_DATA
-
EVENT_WITH_ERROR_TRACE
-
EVENT_WITH_ONE_STRING
-
EVENT_WITH_RUNMODE_TID_AND_ONE_STRING
-
EVENT_WITH_RUNMODE_TID_AND_TWO_STRINGS
-
EVENT_TEST_CONTROL
-
NO_POSITION
private static final int NO_POSITION- See Also:
-
debugSink
-
-
Constructor Details
-
EventDecoder
-
-
Method Details
-
decode
public Event decode(@Nonnull AbstractStreamDecoder<Event, ForkedProcessEventType, throws IOExceptionSegmentType>.Memento memento) - Specified by:
decodein classAbstractStreamDecoder<Event,ForkedProcessEventType, SegmentType> - Throws:
IOException
-
getEncodedMagicNumber
- Specified by:
getEncodedMagicNumberin classAbstractStreamDecoder<Event,ForkedProcessEventType, SegmentType>
-
nextSegmentType
- Specified by:
nextSegmentTypein classAbstractStreamDecoder<Event,ForkedProcessEventType, SegmentType>
-
toMessage
@Nonnull protected final Event toMessage(@Nonnull ForkedProcessEventType eventType, @Nonnull AbstractStreamDecoder<Event, ForkedProcessEventType, throws AbstractStreamDecoder.MalformedFrameExceptionSegmentType>.Memento memento) - Specified by:
toMessagein classAbstractStreamDecoder<Event,ForkedProcessEventType, SegmentType> - Throws:
AbstractStreamDecoder.MalformedFrameException
-
toReportEntry
-
toStackTraceWriter
-
toTrace
private static StackTraceWriter toTrace(String traceMessage, String smartTrimmedStackTrace, String stackTrace) -
newReportEntry
static TestSetReportEntry newReportEntry(RunMode runMode, long testRunId, String source, String sourceText, String name, String nameText, String group, String message, Integer timeElapsed, String traceMessage, String smartTrimmedStackTrace, String stackTrace) throws NumberFormatException - Throws:
NumberFormatException
-
segmentsToEvents
-
segmentsToRunModes
-
debugStream
protected void debugStream(byte[] array, int position, int remaining) - Overrides:
debugStreamin classAbstractStreamDecoder<Event,ForkedProcessEventType, SegmentType>
-
newDebugSink
-
close
- Throws:
IOException
-