Interface MessageBuffer
- All Known Subinterfaces:
MessageBuffer.Wrapped<T>
public interface MessageBuffer
A buffer for messages that can be sent over the network.
- Since:
- 2.9.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a buffer that wraps an internal buffer type. -
Method Summary
Modifier and TypeMethodDescriptionintlength()Gets the length of the buffer.<T> Tbyte[]Serializes the buffer to a byte array.<T> void
-
Method Details
-
read
- Type Parameters:
T- the type of message to read- Parameters:
type- the type of message to read- Returns:
- the read message
-
write
- Type Parameters:
T- the type of message to write- Parameters:
type- the type of message to writevalue- the value to write
-
serialize
byte[] serialize()Serializes the buffer to a byte array.- Returns:
- the serialized byte array
-
length
int length()Gets the length of the buffer.- Returns:
- the length of the buffer
-