Class SerializedPayload
java.lang.Object
org.drasyl.node.handler.serialization.SerializedPayload
This class models the serialized payload of a drasyl application message.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ImmutableByteArrayabstract StringgetType()static SerializedPayloadof(io.netty.buffer.ByteBuf byteBuf) static SerializedPayloadof(String type, ImmutableByteArray payload) voidwriteTo(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
-