public final class BlockResponse extends Object
BlockRequest
, the response back is of this type.
To serialize the response to network, BlockResponse.Encoder
is used.Modifier and Type | Class and Description |
---|---|
static class |
BlockResponse.Encoder
Encodes a
BlockResponse to network. |
Constructor and Description |
---|
BlockResponse(long blockId,
long offset,
long length,
BlockHandler handler) |
Modifier and Type | Method and Description |
---|---|
static BlockResponse |
createErrorResponse(long blockId)
Creates a
BlockResponse that represents a error case for the given
block. |
long |
getBlockId() |
BlockHandler |
getHandler() |
long |
getLength() |
long |
getOffset() |
public BlockResponse(long blockId, long offset, long length, BlockHandler handler)
public static BlockResponse createErrorResponse(long blockId)
BlockResponse
that represents a error case for the given
block.public long getBlockId()
public BlockHandler getHandler()
public long getLength()
public long getOffset()
Copyright © 2015. All Rights Reserved.