public interface IPacketFactory
IPacket
s given their PacketProtocolInformation
.Modifier and Type | Method and Description |
---|---|
boolean |
areStreamPacketsPreferred()
Gets if
getPacket(PacketProtocolInformation) prefers returning IStreamedPacket s if possible. |
IPacket |
getPacket(PacketProtocolInformation information)
Constructs a
IPacket of the protocol specified by the passed PacketProtocolInformation instance. |
void |
setStreamPacketsPreferred(boolean preferred)
Sets if
getPacket(PacketProtocolInformation) prefers returning IStreamedPacket s if possible. |
IPacket getPacket(PacketProtocolInformation information)
IPacket
of the protocol specified by the passed PacketProtocolInformation
instance.information
- The protocol information to use.java.lang.NullPointerException
- The information is null.boolean areStreamPacketsPreferred()
getPacket(PacketProtocolInformation)
prefers returning IStreamedPacket
s if possible.void setStreamPacketsPreferred(boolean preferred)
getPacket(PacketProtocolInformation)
prefers returning IStreamedPacket
s if possible.preferred
- If streamed packets are preferred for construction.