com.tibbo.aggregate.common.communication

## Class Command

- java.lang.Object
- - java.io.OutputStream
  - - java.io.ByteArrayOutputStream
    - - com.tibbo.aggregate.common.communication.Command

- All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
  Direct Known Subclasses:
    AggreGateCommand

      public abstract class Command
      extends java.io.ByteArrayOutputStream

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `completed`

    - ### Fields inherited from class java.io.ByteArrayOutputStream

      `buf, count`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Command()`
    `Command(byte[] data)`
    `Command(java.lang.String data)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(java.lang.String data)`
    `void` | `complete()`
    `java.lang.String` | `footer()`
    `java.lang.String` | `getContent()`
    `java.lang.String` | `getId()`
    `java.lang.Long` | `getTimeout()`
    `java.lang.String` | `header()`
    `boolean` | `isAsync()`
    `boolean` | `isContentEmpty()`
    `void` | `send(java.nio.channels.ByteChannel byteChannel)`
    `void` | `send(java.nio.channels.ByteChannel byteChannel, boolean encapsulate)`
    `void` | `send(java.io.OutputStream stream)`
    `void` | `setTimeout(java.lang.Long timeout)`

    - ### Methods inherited from class java.io.ByteArrayOutputStream

      `close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo`

    - ### Methods inherited from class java.io.OutputStream

      `flush, write`

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

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

- - ### Field Detail

    - #### completed

          protected boolean completed

  - ### Constructor Detail

    - #### Command

          public Command()

    - #### Command

          public Command(java.lang.String data)

    - #### Command

          public Command(byte[] data)

  - ### Method Detail

    - #### header

          public java.lang.String header()

    - #### footer

          public java.lang.String footer()

    - #### getContent

          public java.lang.String getContent()

    - #### isContentEmpty

          public boolean isContentEmpty()

    - #### add

          public void add(java.lang.String data)

    - #### send

          public void send(java.nio.channels.ByteChannel byteChannel)
                    throws DisconnectionException,
                           java.io.IOException

      Throws:
        `DisconnectionException`
        `java.io.IOException`

    - #### send

          public void send(java.nio.channels.ByteChannel byteChannel,
                           boolean encapsulate)
                    throws DisconnectionException,
                           java.io.IOException

      Throws:
        `DisconnectionException`
        `java.io.IOException`

    - #### send

          public void send(java.io.OutputStream stream)
                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getId

          public java.lang.String getId()

    - #### isAsync

          public boolean isAsync()

    - #### getTimeout

          public java.lang.Long getTimeout()

    - #### setTimeout

          public void setTimeout(java.lang.Long timeout)

    - #### complete

          public void complete()