Class SerializedPayload
java.lang.Object
org.drasyl.node.handler.serialization.SerializedPayload
This class models the serialized payload of a drasyl application message.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract ImmutableByteArray
abstract String
getType()
static SerializedPayload
of
(io.netty.buffer.ByteBuf byteBuf) static SerializedPayload
of
(String type, ImmutableByteArray payload) void
writeTo
(io.netty.buffer.ByteBuf byteBuf) Writes this message to the bufferbyteBuf
.
-
Field Details
-
MIN_LENGTH
public static final int MIN_LENGTH- See Also:
-
-
Constructor Details
-
SerializedPayload
public SerializedPayload()
-
-
Method Details
-
getType
-
getPayload
-
writeTo
public void writeTo(io.netty.buffer.ByteBuf byteBuf) Writes this message to the bufferbyteBuf
.- Parameters:
byteBuf
- writes this message to the given buffer
-
of
-
of
public static SerializedPayload of(io.netty.buffer.ByteBuf byteBuf) throws InvalidMessageFormatException - Throws:
InvalidMessageFormatException
-