com.tibbo.aggregate.common.communication

## Class SimpleCommandParser<C extends Command>

- java.lang.Object
- - com.tibbo.aggregate.common.communication.AbstractCommandParser<C>
  - - com.tibbo.aggregate.common.communication.BufferedCommandParser<C>
    - - com.tibbo.aggregate.common.communication.SimpleCommandParser<C>

- All Implemented Interfaces:
    CommandParser<C>
  Direct Known Subclasses:
    AggreGateCommandParser

      public abstract class SimpleCommandParser<C extends Command>
      extends BufferedCommandParser<C>

- - ### Field Summary

    - ### Fields inherited from class com.tibbo.aggregate.common.communication.BufferedCommandParser

      `buffer, channel`

  - ### Constructor Summary

    Constructors
    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)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected C` | `buildCommand()`
    `void` | `clearCommand()`
    `protected boolean` | `commandEnded(byte cur)`
    `protected abstract C` | `createCommandFromBufferContent()`
    `boolean` | `isFull()`

    - ### Methods inherited from class com.tibbo.aggregate.common.communication.BufferedCommandParser

      `commandCompleted, getChannel, readCommand`

    - ### Methods inherited from class com.tibbo.aggregate.common.communication.AbstractCommandParser

      `addData, clearData, getData, getListener, reset, setListener, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleCommandParser

          public SimpleCommandParser(java.nio.channels.ReadableByteChannel channel,
                                     java.lang.Byte startChar,
                                     byte endChar)

    - #### SimpleCommandParser

          public SimpleCommandParser(java.nio.channels.ReadableByteChannel channel,
                                     java.lang.Byte startChar,
                                     byte endChar,
                                     java.lang.Byte endChar2,
                                     boolean needBoth)

  - ### Method Detail

    - #### createCommandFromBufferContent

          protected abstract C createCommandFromBufferContent()
                                                       throws SyntaxErrorException

      Throws:
        `SyntaxErrorException`

    - #### clearCommand

          public void clearCommand()

    - #### buildCommand

          protected C buildCommand()
                            throws SyntaxErrorException

      Specified by:
        `buildCommand` in class `BufferedCommandParser<C extends Command>`
      Throws:
        `SyntaxErrorException`

    - #### commandEnded

          protected boolean commandEnded(byte cur)

      Specified by:
        `commandEnded` in class `BufferedCommandParser<C extends Command>`

    - #### isFull

          public boolean isFull()