@ThreadSafe public abstract class RPCMessage extends Object implements EncodedMessage
Modifier and Type | Class and Description |
---|---|
static class |
RPCMessage.Type
The possible types of RPC messages.
|
Constructor and Description |
---|
RPCMessage() |
Modifier and Type | Method and Description |
---|---|
static io.netty.handler.codec.ByteToMessageDecoder |
createFrameDecoder()
Creates a decoder that splits up the incoming ByteBuf into new ByteBuf's according to a length
field in the input.
|
static RPCMessage |
decodeMessage(RPCMessage.Type type,
io.netty.buffer.ByteBuf in)
Returns the message of message type 'type', decoded from the input ByteBuf.
|
DataBuffer |
getPayloadDataBuffer()
Returns the data buffer of the payload.
|
abstract RPCMessage.Type |
getType()
Returns the type of the message.
|
boolean |
hasPayload()
Returns true if the message has a payload.
|
void |
validate()
Validates the message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encode, getEncodedLength
public abstract RPCMessage.Type getType()
public void validate()
public boolean hasPayload()
@Nullable public DataBuffer getPayloadDataBuffer()
public static io.netty.handler.codec.ByteToMessageDecoder createFrameDecoder()
public static RPCMessage decodeMessage(RPCMessage.Type type, io.netty.buffer.ByteBuf in)
type
- The type of message to decodein
- the input ByteBuf
Copyright © 2023. All Rights Reserved.