com.tibbo.aggregate.common.protocol

## Class OutgoingAggreGateCommand

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

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

      public class OutgoingAggreGateCommand
      extends AggreGateCommand

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `async`
    `protected java.lang.String` | `id`
    `protected int` | `paramCount`

    - ### Fields inherited from class com.tibbo.aggregate.common.protocol.AggreGateCommand

      `CLIENT_COMMAND_VISIBLE_SEPARATOR, COMMAND_CODE_MESSAGE, COMMAND_CODE_REPLY, COMMAND_OPERATION_ADD_EVENT_LISTENER, COMMAND_OPERATION_CALL_FUNCTION, COMMAND_OPERATION_GET_VAR, COMMAND_OPERATION_REMOVE_EVENT_LISTENER, COMMAND_OPERATION_SET_VAR, END_CHAR, INDEX_COMMAND_CODE, INDEX_DATA_TABLE_IN_REPLY, INDEX_EVENT_CONTEXT, INDEX_EVENT_DATA_TABLE, INDEX_EVENT_ID, INDEX_EVENT_LEVEL, INDEX_EVENT_LISTENER, INDEX_EVENT_NAME, INDEX_EVENT_SERVER_ID, INDEX_EVENT_TIMESTAMP, INDEX_ID, INDEX_MESSAGE_CODE, INDEX_OPERATION_CODE, INDEX_OPERATION_CONTEXT, INDEX_OPERATION_FILTER, INDEX_OPERATION_FINGERPRINT, INDEX_OPERATION_LISTENER_CODE, INDEX_OPERATION_MESSAGE_DATA_TABLE, INDEX_OPERATION_MESSAGE_FLAGS, INDEX_OPERATION_MESSAGE_QUEUE_NAME, INDEX_OPERATION_TARGET, INDEX_PROTOCOL_VERSION, INDEX_REPLY_CODE, INDEX_REPLY_DETAILS, INDEX_REPLY_MESSAGE, INDEX_START_COMPRESSION, INDEX_START_PROTOCOL_VERSION, JSON_START_ARRAY_SEPARATOR, MESSAGE_CODE_COMPRESSION, MESSAGE_CODE_EVENT, MESSAGE_CODE_OPERATION, MESSAGE_CODE_START, START_CHAR`

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

      `completed`

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

      `buf, count`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OutgoingAggreGateCommand()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `OutgoingAggreGateCommand` | `addParam(java.lang.String param)`
    `void` | `constructEvent(java.lang.String context, java.lang.String name, int level, java.lang.String encodedDataTable, java.lang.Long eventId, java.util.Date creationtime, java.lang.Integer listener)`
    `void` | `constructReply(java.lang.String id, java.lang.String code)`
    `void` | `constructReply(java.lang.String id, java.lang.String code, java.lang.String message)`
    `void` | `constructReply(java.lang.String id, java.lang.String code, java.lang.String message, java.lang.String details)`
    `java.lang.String` | `footer()`
    `java.lang.String` | `getId()`
    `java.lang.String` | `header()`
    `boolean` | `isAsync()`
    `void` | `setAsync(boolean async)`

    - ### Methods inherited from class com.tibbo.aggregate.common.protocol.AggreGateCommand

      `checkCommandString, generateId, toString`

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

      `add, complete, getContent, getTimeout, isContentEmpty, send, send, send, setTimeout`

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

      `close, reset, size, toByteArray, 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

    - #### paramCount

          protected int paramCount

    - #### id

          protected java.lang.String id

    - #### async

          protected boolean async

  - ### Constructor Detail

    - #### OutgoingAggreGateCommand

          public OutgoingAggreGateCommand()

  - ### Method Detail

    - #### header

          public java.lang.String header()

      Overrides:
        `header` in class `Command`

    - #### footer

          public java.lang.String footer()

      Overrides:
        `footer` in class `Command`

    - #### addParam

          public OutgoingAggreGateCommand addParam(java.lang.String param)

    - #### getId

          public java.lang.String getId()

      Overrides:
        `getId` in class `Command`

    - #### setAsync

          public void setAsync(boolean async)

    - #### isAsync

          public boolean isAsync()

      Overrides:
        `isAsync` in class `Command`

    - #### constructReply

          public void constructReply(java.lang.String id,
                                     java.lang.String code)

    - #### constructReply

          public void constructReply(java.lang.String id,
                                     java.lang.String code,
                                     java.lang.String message)

    - #### constructReply

          public void constructReply(java.lang.String id,
                                     java.lang.String code,
                                     java.lang.String message,
                                     java.lang.String details)

    - #### constructEvent

          public void constructEvent(java.lang.String context,
                                     java.lang.String name,
                                     int level,
                                     java.lang.String encodedDataTable,
                                     java.lang.Long eventId,
                                     java.util.Date creationtime,
                                     java.lang.Integer listener)