public final class MessageHeaderCodec extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_SIZE |
| Modifier and Type | Method and Description |
|---|---|
static Message.Content[] |
decodeContentTypes(int contentTypes,
Message message)
Decodes the content types from a 32bit number.
|
static Message |
decodeHeader(io.netty.buffer.ByteBuf buffer,
InetSocketAddress recipient,
InetSocketAddress sender)
Decode a message header from a Netty buffer.
|
static int |
encodeContentTypes(Message.Content[] contentTypes)
Encodes the content types to a 32bit number.
|
static io.netty.buffer.ByteBuf |
encodeHeader(io.netty.buffer.ByteBuf buffer,
Message message)
Encodes the message object.
|
public static final int HEADER_SIZE
public static io.netty.buffer.ByteBuf encodeHeader(io.netty.buffer.ByteBuf buffer,
Message message)
buffer - The Netty buffer to fillmessage - The message with the header that will be serializedpublic static Message decodeHeader(io.netty.buffer.ByteBuf buffer, InetSocketAddress recipient, InetSocketAddress sender)
buffer - The buffer to decode fromrecipient - The recipient of the messagesender - The sender of the packet, which has been set in the socket classpublic static int encodeContentTypes(Message.Content[] contentTypes)
#decodeContentTypes(int).contentTypes - The 8 content types. Null means Emptypublic static Message.Content[] decodeContentTypes(int contentTypes, Message message)
#encodeContentTypes(Content[]).contentTypes - The 8 content types. No null values are returnedmessage - Copyright © 2014. All rights reserved.