nxt.peer

## Class NetworkMessage.GetNextBlockIdsMessage

- java.lang.Object
- - nxt.peer.NetworkMessage
  - - nxt.peer.NetworkMessage.GetNextBlockIdsMessage

- Enclosing class:
    NetworkMessage

      public static class NetworkMessage.GetNextBlockIdsMessage
      extends NetworkMessage

  The GetNextBlockIds message is sent when a peer is downloading the blockchain. The BlockIds message is returned in response.
  - Message identifier (long)
  - Start block identifier (long)
  - Maximum number of blocks (integer)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class nxt.peer.NetworkMessage

      `NetworkMessage.AddPeersMessage, NetworkMessage.BlockchainStateMessage, NetworkMessage.BlockIdsMessage, NetworkMessage.BlockInventoryMessage, NetworkMessage.BlocksMessage, NetworkMessage.BundlerRateMessage, NetworkMessage.CumulativeDifficultyMessage, NetworkMessage.ErrorMessage, NetworkMessage.GetBlockMessage, NetworkMessage.GetCumulativeDifficultyMessage, NetworkMessage.GetInfoMessage, NetworkMessage.GetMilestoneBlockIdsMessage, NetworkMessage.GetNextBlockIdsMessage, NetworkMessage.GetNextBlocksMessage, NetworkMessage.GetPeersMessage, NetworkMessage.GetTransactionsMessage, NetworkMessage.GetUnconfirmedTransactionsMessage, NetworkMessage.MilestoneBlockIdsMessage, NetworkMessage.TransactionsInventoryMessage, NetworkMessage.TransactionsMessage`

  - ### Field Summary

    - ### Fields inherited from class nxt.peer.NetworkMessage

      `MAX_ARRAY_LENGTH, MAX_LIST_SIZE, messageId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GetNextBlockIdsMessage(long blockId, int limit)` Construct a GetNextBlockIds message

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected NetworkMessage` | `constructMessage(java.nio.ByteBuffer bytes)` Construct the message from the message bytes
    `long` | `getBlockId()` Get the start block identifier
    `int` | `getLimit()` Get the limit

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

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

- - ### Constructor Detail

    - #### GetNextBlockIdsMessage

          public GetNextBlockIdsMessage(long blockId,
                                        int limit)

      Construct a GetNextBlockIds message
      Parameters:
        `blockId` - Start block identifier
        `limit` - Maximum number of blocks

  - ### Method Detail

    - #### constructMessage

          protected NetworkMessage constructMessage(java.nio.ByteBuffer bytes)
                                             throws java.nio.BufferOverflowException,
                                                    java.nio.BufferUnderflowException,
                                                    nxt.peer.NetworkException

      Construct the message from the message bytes
      Overrides:
        `constructMessage` in class `NetworkMessage`
      Parameters:
        `bytes` - Message bytes following the message name
      Returns:
        Message
      Throws:
        `java.nio.BufferOverflowException` - Message buffer is too small
        `java.nio.BufferUnderflowException` - Message is too short
        `NetworkException` - Message is not valid

    - #### getBlockId

          public long getBlockId()

      Get the start block identifier
      Returns:
        Start block identifier

    - #### getLimit

          public int getLimit()

      Get the limit
      Returns:
        Limit