Class CommandChannelDecoder
- java.lang.Object
-
- org.apache.maven.surefire.booter.spi.CommandChannelDecoder
-
- All Implemented Interfaces:
java.lang.AutoCloseable,MasterProcessChannelDecoder
public class CommandChannelDecoder extends java.lang.Object implements MasterProcessChannelDecoder
magic number : opcode [: opcode specific data]*- Since:
- 3.0.0-M5
-
-
Field Summary
Fields Modifier and Type Field Description private CommandDecoderdecoderprivate AbstractStreamDecoder.Mementomemento
-
Constructor Summary
Constructors Constructor Description CommandChannelDecoder(java.nio.channels.ReadableByteChannel channel, ForkNodeArguments arguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Commanddecode()Reads the bytes from a channel, waiting until the command is read completely or the channel throwsEOFException.
-
-
-
Field Detail
-
decoder
private final CommandDecoder decoder
-
memento
private AbstractStreamDecoder.Memento memento
-
-
Constructor Detail
-
CommandChannelDecoder
public CommandChannelDecoder(@Nonnull java.nio.channels.ReadableByteChannel channel, @Nonnull ForkNodeArguments arguments)
-
-
Method Detail
-
decode
@Nonnull public Command decode() throws java.io.IOException
Description copied from interface:MasterProcessChannelDecoderReads the bytes from a channel, waiting until the command is read completely or the channel throwsEOFException.
This method is called in a single Thread. The constructor can be called within another thread.- Specified by:
decodein interfaceMasterProcessChannelDecoder- Returns:
- decoded command
- Throws:
java.io.IOException- exception in channel
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceMasterProcessChannelDecoder- Throws:
java.io.IOException
-
-