- java.lang.Object
-
- swim.mqtt.MqttPacket<T>
-
- swim.mqtt.MqttPublishPacket<T>
-
- All Implemented Interfaces:
Debug
public final class MqttPublishPacket<T> extends MqttPacket<T> implements Debug
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> MqttPublishPacket<T>
create(int packetFlags, String topicName, int packetId, T payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
static MqttPublishPacket<Object>
create(String topicName)
static <T> MqttPublishPacket<T>
create(String topicName, int packetId, T payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
static <T> MqttPublishPacket<T>
create(String topicName, T payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
<T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.boolean
dup()
MqttPublishPacket<T>
dup(boolean dup)
Encoder<?,MqttPublishPacket<T>>
encodeMqtt(OutputBuffer<?> output, MqttEncoder mqtt)
boolean
equals(Object other)
int
hashCode()
boolean
hasPacketId()
Encoder<?,MqttPublishPacket<T>>
mqttEncoder(MqttEncoder mqtt)
int
packetFlags()
int
packetId()
MqttPublishPacket<T>
packetId(int packetId)
int
packetType()
MqttPublishPacket<String>
payload(String payloadValue)
<U> MqttPublishPacket<U>
payload(ByteBuffer payloadValue)
<U> MqttPublishPacket<U>
payload(Encoder<?,?> payloadEncoder, int payloadSize)
MqttPublishPacket<Data>
payload(Data payloadValue)
<U> MqttPublishPacket<U>
payload(U payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
Encoder<?,?>
payloadEncoder()
int
payloadSize()
T
payloadValue()
<U> MqttPublishPacket<U>
payloadValue(U payloadValue)
MqttQoS
qos()
MqttPublishPacket<T>
qos(MqttQoS qos)
boolean
retain()
MqttPublishPacket<T>
retain(boolean retain)
String
topicName()
MqttPublishPacket<T>
topicName(String topicName)
String
toString()
-
Methods inherited from class swim.mqtt.MqttPacket
encodeMqtt, mqttEncoder
-
-
-
-
Method Detail
-
packetType
public int packetType()
- Specified by:
packetType
in classMqttPacket<T>
-
packetFlags
public int packetFlags()
- Specified by:
packetFlags
in classMqttPacket<T>
-
retain
public boolean retain()
-
retain
public MqttPublishPacket<T> retain(boolean retain)
-
qos
public MqttQoS qos()
-
qos
public MqttPublishPacket<T> qos(MqttQoS qos)
-
dup
public boolean dup()
-
dup
public MqttPublishPacket<T> dup(boolean dup)
-
topicName
public String topicName()
-
topicName
public MqttPublishPacket<T> topicName(String topicName)
-
hasPacketId
public boolean hasPacketId()
-
packetId
public int packetId()
-
packetId
public MqttPublishPacket<T> packetId(int packetId)
-
payloadValue
public T payloadValue()
-
payloadValue
public <U> MqttPublishPacket<U> payloadValue(U payloadValue)
-
payloadEncoder
public Encoder<?,?> payloadEncoder()
-
payloadSize
public int payloadSize()
-
payload
public <U> MqttPublishPacket<U> payload(U payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
-
payload
public <U> MqttPublishPacket<U> payload(Encoder<?,?> payloadEncoder, int payloadSize)
-
payload
public <U> MqttPublishPacket<U> payload(ByteBuffer payloadValue)
-
payload
public MqttPublishPacket<Data> payload(Data payloadValue)
-
payload
public MqttPublishPacket<String> payload(String payloadValue)
-
mqttEncoder
public Encoder<?,MqttPublishPacket<T>> mqttEncoder(MqttEncoder mqtt)
- Specified by:
mqttEncoder
in classMqttPacket<T>
-
encodeMqtt
public Encoder<?,MqttPublishPacket<T>> encodeMqtt(OutputBuffer<?> output, MqttEncoder mqtt)
- Specified by:
encodeMqtt
in classMqttPacket<T>
-
debug
public <T> Output<T> debug(Output<T> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.
-
create
public static <T> MqttPublishPacket<T> create(int packetFlags, String topicName, int packetId, T payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
-
create
public static <T> MqttPublishPacket<T> create(String topicName, int packetId, T payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
-
create
public static <T> MqttPublishPacket<T> create(String topicName, T payloadValue, Encoder<?,?> payloadEncoder, int payloadSize)
-
create
public static MqttPublishPacket<Object> create(String topicName)
-
-