public static enum RPCMessage.Type extends Enum<RPCMessage.Type> implements EncodedMessage
| Enum Constant and Description |
|---|
RPC_BLOCK_READ_REQUEST |
RPC_BLOCK_READ_RESPONSE |
RPC_BLOCK_WRITE_REQUEST |
RPC_BLOCK_WRITE_RESPONSE |
RPC_ERROR_RESPONSE |
| Modifier and Type | Method and Description |
|---|---|
static RPCMessage.Type |
decode(io.netty.buffer.ByteBuf in)
Returns the type represented by the id from the input ByteBuf.
|
void |
encode(io.netty.buffer.ByteBuf out)
Encodes the message to the output
ByteBuf. |
int |
getEncodedLength()
Returns the number bytes for the message when it is encoded.
|
int |
getId()
Returns the int identifier of the type.
|
static RPCMessage.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RPCMessage.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RPCMessage.Type RPC_ERROR_RESPONSE
public static final RPCMessage.Type RPC_BLOCK_READ_REQUEST
public static final RPCMessage.Type RPC_BLOCK_READ_RESPONSE
public static final RPCMessage.Type RPC_BLOCK_WRITE_REQUEST
public static final RPCMessage.Type RPC_BLOCK_WRITE_RESPONSE
public static RPCMessage.Type[] values()
for (RPCMessage.Type c : RPCMessage.Type.values()) System.out.println(c);
public static RPCMessage.Type valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getEncodedLength()
EncodedMessagegetEncodedLength in interface EncodedMessagepublic void encode(io.netty.buffer.ByteBuf out)
EncodedMessageByteBuf.encode in interface EncodedMessageout - the output ByteBuf where the message should be encoded.public int getId()
DataServerMessage, since that class needs to manually encode all
messages. DataServerMessage and this method should no longer be needed
when the client is converted to use Netty.public static RPCMessage.Type decode(io.netty.buffer.ByteBuf in)
in - The input ByteBuf to decode into a typeCopyright © 2015. All Rights Reserved.