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 CommandDecoder
decoder
private AbstractStreamDecoder.Memento
memento
-
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 void
close()
Command
decode()
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:MasterProcessChannelDecoder
Reads 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:
decode
in interfaceMasterProcessChannelDecoder
- Returns:
- decoded command
- Throws:
java.io.IOException
- exception in channel
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceMasterProcessChannelDecoder
- Throws:
java.io.IOException
-
-