public abstract class SimpleCommandParser<C extends Command> extends BufferedCommandParser<C>
buffer, channel| Constructor and Description |
|---|
SimpleCommandParser(java.nio.channels.ReadableByteChannel channel,
java.lang.Byte startChar,
byte endChar) |
SimpleCommandParser(java.nio.channels.ReadableByteChannel channel,
java.lang.Byte startChar,
byte endChar,
java.lang.Byte endChar2,
boolean needBoth) |
| Modifier and Type | Method and Description |
|---|---|
protected C |
buildCommand() |
void |
clearCommand() |
protected boolean |
commandEnded(byte cur) |
protected abstract C |
createCommandFromBufferContent() |
boolean |
isFull() |
commandCompleted, getChannel, readCommandaddData, clearData, getData, getListener, reset, setListener, toStringpublic SimpleCommandParser(java.nio.channels.ReadableByteChannel channel,
java.lang.Byte startChar,
byte endChar)
public SimpleCommandParser(java.nio.channels.ReadableByteChannel channel,
java.lang.Byte startChar,
byte endChar,
java.lang.Byte endChar2,
boolean needBoth)
protected abstract C createCommandFromBufferContent() throws SyntaxErrorException
SyntaxErrorExceptionpublic void clearCommand()
protected C buildCommand() throws SyntaxErrorException
buildCommand in class BufferedCommandParser<C extends Command>SyntaxErrorExceptionprotected boolean commandEnded(byte cur)
commandEnded in class BufferedCommandParser<C extends Command>public boolean isFull()