Interface Client.ChunkListener

  • Enclosing class:
    Client

    public static interface Client.ChunkListener
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Object handle​(Client client, byte subscriptionId, long offset, long messageCount, long dataSize)
      Callback when a chunk is received as part of a deliver operation.
    • Method Detail

      • handle

        Object handle​(Client client,
                      byte subscriptionId,
                      long offset,
                      long messageCount,
                      long dataSize)
        Callback when a chunk is received as part of a deliver operation.

        Note the offset is an unsigned long. Longs are signed in Java, but unsigned longs can be used as long as some care is taken for some operations. See the unsigned* static methods in Long.

        Parameters:
        client - the client instance (e.g. to ask for more credit)
        subscriptionId - the subscription ID to correlate with a callback
        offset - the first offset in the chunk
        messageCount - the total number of messages in the chunk
        dataSize - the size in bytes of the data in the chunk
        Returns:
        a "chunk context" instance that'll be passed in to the Client.MessageListener