Class CommandDecoder
java.lang.Object
org.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>
org.apache.maven.surefire.booter.stream.CommandDecoder
- All Implemented Interfaces:
AutoCloseable
public class CommandDecoder
extends org.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.maven.surefire.api.stream.AbstractStreamDecoder
org.apache.maven.surefire.api.stream.AbstractStreamDecoder.BufferedStream, org.apache.maven.surefire.api.stream.AbstractStreamDecoder.MalformedFrameException, org.apache.maven.surefire.api.stream.AbstractStreamDecoder.Memento, org.apache.maven.surefire.api.stream.AbstractStreamDecoder.Segment, org.apache.maven.surefire.api.stream.AbstractStreamDecoder.StreamReadStatus -
Field Summary
Fields inherited from class org.apache.maven.surefire.api.stream.AbstractStreamDecoder
BUFFER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCommandDecoder(ReadableByteChannel channel, org.apache.maven.surefire.api.fork.ForkNodeArguments arguments) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voiddebugStream(byte[] array, int position, int remaining) org.apache.maven.surefire.api.booter.Commanddecode(org.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>.org.apache.maven.surefire.api.stream.AbstractStreamDecoder.Memento memento) protected final byte[]protected org.apache.maven.surefire.api.stream.SegmentType[]nextSegmentType(org.apache.maven.surefire.api.booter.MasterProcessCommand commandType) protected org.apache.maven.surefire.api.booter.CommandtoMessage(org.apache.maven.surefire.api.booter.MasterProcessCommand commandType, org.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>.org.apache.maven.surefire.api.stream.AbstractStreamDecoder.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
public CommandDecoder(@Nonnull ReadableByteChannel channel, @Nonnull org.apache.maven.surefire.api.fork.ForkNodeArguments arguments)
-
-
Method Details
-
decode
public org.apache.maven.surefire.api.booter.Command decode(@Nonnull org.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>.org.apache.maven.surefire.api.stream.AbstractStreamDecoder.Memento memento) throws IOException, org.apache.maven.surefire.api.stream.MalformedChannelException - Specified by:
decodein classorg.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>- Throws:
IOExceptionorg.apache.maven.surefire.api.stream.MalformedChannelException
-
getEncodedMagicNumber
- Specified by:
getEncodedMagicNumberin classorg.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>
-
nextSegmentType
@Nonnull protected org.apache.maven.surefire.api.stream.SegmentType[] nextSegmentType(@Nonnull org.apache.maven.surefire.api.booter.MasterProcessCommand commandType) - Specified by:
nextSegmentTypein classorg.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>
-
toMessage
@Nonnull protected org.apache.maven.surefire.api.booter.Command toMessage(@Nonnull org.apache.maven.surefire.api.booter.MasterProcessCommand commandType, @Nonnull org.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>.org.apache.maven.surefire.api.stream.AbstractStreamDecoder.Memento memento) throws org.apache.maven.surefire.api.stream.AbstractStreamDecoder.MalformedFrameException - Specified by:
toMessagein classorg.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>- Throws:
org.apache.maven.surefire.api.stream.AbstractStreamDecoder.MalformedFrameException
-
debugStream
protected void debugStream(byte[] array, int position, int remaining) - Overrides:
debugStreamin classorg.apache.maven.surefire.api.stream.AbstractStreamDecoder<org.apache.maven.surefire.api.booter.Command, org.apache.maven.surefire.api.booter.MasterProcessCommand, org.apache.maven.surefire.api.stream.SegmentType>
-
close
- Throws:
IOException
-