public class CommandDecoder extends AbstractStreamDecoder<Command,MasterProcessCommand,SegmentType>
AbstractStreamDecoder.BufferedStream, AbstractStreamDecoder.MalformedFrameException, AbstractStreamDecoder.Memento, AbstractStreamDecoder.Segment, AbstractStreamDecoder.StreamReadStatusBUFFER_SIZE| Constructor and Description |
|---|
CommandDecoder(ReadableByteChannel channel,
ForkNodeArguments arguments) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
debugStream(byte[] array,
int position,
int remaining) |
Command |
decode(AbstractStreamDecoder.Memento memento) |
protected byte[] |
getEncodedMagicNumber() |
protected SegmentType[] |
nextSegmentType(MasterProcessCommand commandType) |
protected Command |
toMessage(MasterProcessCommand commandType,
AbstractStreamDecoder.Memento memento) |
checkArguments, checkDelimiter, checkHeader, getArguments, printRemainingStream, read, readByte, readCharset, readInt, readInteger, readLong, readLongPrivate, readMessageType, readSegment, readStringpublic CommandDecoder(@Nonnull ReadableByteChannel channel, @Nonnull ForkNodeArguments arguments)
public Command decode(@Nonnull AbstractStreamDecoder.Memento memento) throws IOException, MalformedChannelException
decode in class AbstractStreamDecoder<Command,MasterProcessCommand,SegmentType>IOExceptionMalformedChannelException@Nonnull protected final byte[] getEncodedMagicNumber()
getEncodedMagicNumber in class AbstractStreamDecoder<Command,MasterProcessCommand,SegmentType>@Nonnull protected SegmentType[] nextSegmentType(@Nonnull MasterProcessCommand commandType)
nextSegmentType in class AbstractStreamDecoder<Command,MasterProcessCommand,SegmentType>@Nonnull protected Command toMessage(@Nonnull MasterProcessCommand commandType, @Nonnull AbstractStreamDecoder.Memento memento) throws AbstractStreamDecoder.MalformedFrameException
toMessage in class AbstractStreamDecoder<Command,MasterProcessCommand,SegmentType>AbstractStreamDecoder.MalformedFrameExceptionprotected void debugStream(byte[] array,
int position,
int remaining)
debugStream in class AbstractStreamDecoder<Command,MasterProcessCommand,SegmentType>public void close()
throws IOException
IOExceptionCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.