Class CommandDecoder
java.lang.Object
org.apache.maven.surefire.api.stream.AbstractStreamDecoder<Command,MasterProcessCommand,SegmentType>
org.apache.maven.surefire.booter.stream.CommandDecoder
- 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
Fields inherited from class org.apache.maven.surefire.api.stream.AbstractStreamDecoder
BUFFER_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
debugStream
(byte[] array, int position, int remaining) protected final byte[]
protected SegmentType[]
nextSegmentType
(MasterProcessCommand commandType) protected Command
toMessage
(MasterProcessCommand commandType, AbstractStreamDecoder<Command, MasterProcessCommand, SegmentType>.Memento memento) Methods 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
-
Constructor Details
-
CommandDecoder
-
-
Method Details
-
decode
public Command decode(@Nonnull AbstractStreamDecoder<Command, MasterProcessCommand, throws IOException, MalformedChannelExceptionSegmentType>.Memento memento) - Specified by:
decode
in classAbstractStreamDecoder<Command,
MasterProcessCommand, SegmentType> - Throws:
IOException
MalformedChannelException
-
getEncodedMagicNumber
- Specified by:
getEncodedMagicNumber
in classAbstractStreamDecoder<Command,
MasterProcessCommand, SegmentType>
-
nextSegmentType
- Specified by:
nextSegmentType
in classAbstractStreamDecoder<Command,
MasterProcessCommand, SegmentType>
-
toMessage
@Nonnull protected Command toMessage(@Nonnull MasterProcessCommand commandType, @Nonnull AbstractStreamDecoder<Command, MasterProcessCommand, throws AbstractStreamDecoder.MalformedFrameExceptionSegmentType>.Memento memento) - Specified by:
toMessage
in classAbstractStreamDecoder<Command,
MasterProcessCommand, SegmentType> - Throws:
AbstractStreamDecoder.MalformedFrameException
-
debugStream
protected void debugStream(byte[] array, int position, int remaining) - Overrides:
debugStream
in classAbstractStreamDecoder<Command,
MasterProcessCommand, SegmentType>
-
close
- Throws:
IOException
-