Package org.apache.ignite.plugin.extensions.communication

## Interface Message

- All Superinterfaces:
    `Serializable`
  All Known Implementing Classes:
    `HandshakeMessage`, `HandshakeMessage2`, `HandshakeWaitMessage`, `JobStealingRequest`, `NodeIdMessage`, `RecoveryLastReceivedMessage`

      public interface Message
      extends Serializable

  Base class for all communication messages.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `DIRECT_TYPE_SIZE` | Direct type size in bytes.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `short` | `directType()` | Gets message type.
    `byte` | `fieldsCount()` | Gets fields count.
    `void` | `onAckReceived()` | Method called when ack message received.
    `boolean` | `readFrom​(ByteBuffer buf, MessageReader reader)` | Reads this message from provided byte buffer.
    `boolean` | `writeTo​(ByteBuffer buf, MessageWriter writer)` | Writes this message to provided byte buffer.

- - ### Field Detail

    - #### DIRECT_TYPE_SIZE

          static final int DIRECT_TYPE_SIZE

      Direct type size in bytes.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### writeTo

          boolean writeTo​(ByteBuffer buf,
                          MessageWriter writer)

      Writes this message to provided byte buffer.
      Parameters:
        `buf` - Byte buffer.
        `writer` - Writer.
      Returns:
        Whether message was fully written.

    - #### readFrom

          boolean readFrom​(ByteBuffer buf,
                           MessageReader reader)

      Reads this message from provided byte buffer.
      Parameters:
        `buf` - Byte buffer.
        `reader` - Reader.
      Returns:
        Whether message was fully read.

    - #### directType

          short directType()

      Gets message type.
      Returns:
        Message type.

    - #### fieldsCount

          byte fieldsCount()

      Gets fields count.
      Returns:
        Fields count.

    - #### onAckReceived

          void onAckReceived()

      Method called when ack message received.