Class ADPPacket
- java.lang.Object
-
- com.alessiodp.core.common.messaging.ADPPacket
-
- All Implemented Interfaces:
Serializable
public abstract class ADPPacket extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ADPPacket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]build()Serialize the packet as byte array@NotNull StringgetName()Get the name of the packet.@NotNull ADPPacketsetType(Enum<?> type)@NotNull ADPPacketsetVersion(String version)
-
-
-
Method Detail
-
getName
@NotNull public @NotNull String getName()
Get the name of the packet. Usually the name of the packet type.- Returns:
- the name of the packet
-
build
public byte[] build() throws IOExceptionSerialize the packet as byte array- Returns:
- the result as byte array
- Throws:
IOException- if the deserialization fails
-
-