io.netty.handler.codec.mqtt

## Class MqttPublishMessage

- java.lang.Object
- - io.netty.handler.codec.mqtt.MqttMessage
  - - io.netty.handler.codec.mqtt.MqttPublishMessage

All Implemented Interfaces:
  io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted

    public class MqttPublishMessage
    extends MqttMessage
    implements io.netty.buffer.ByteBufHolder

See MQTTV3.1/publish

### Field Summary

### Fields inherited from class io.netty.handler.codec.mqtt.MqttMessage

`DISCONNECT, PINGREQ, PINGRESP`

### Constructor Summary

Constructors
Constructor and Description
`MqttPublishMessage(MqttFixedHeader mqttFixedHeader, MqttPublishVariableHeader variableHeader, io.netty.buffer.ByteBuf payload)`

### Method Summary

All Methods Instance Methods Concrete Methods
`io.netty.buffer.ByteBuf` `content()`
`MqttPublishMessage` `copy()`
`MqttPublishMessage` `duplicate()`
`io.netty.buffer.ByteBuf` `payload()`
`int` `refCnt()`
`boolean` `release()`
`boolean` `release(int decrement)`
`MqttPublishMessage` `replace(io.netty.buffer.ByteBuf content)`
`MqttPublishMessage` `retain()`
`MqttPublishMessage` `retain(int increment)`
`MqttPublishMessage` `retainedDuplicate()`
`MqttPublishMessage` `touch()`
`MqttPublishMessage` `touch(Object hint)`
`MqttPublishVariableHeader` `variableHeader()`

### Methods inherited from class io.netty.handler.codec.mqtt.MqttMessage

`decoderResult, fixedHeader, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### MqttPublishMessage

    public MqttPublishMessage(MqttFixedHeader mqttFixedHeader,
                              MqttPublishVariableHeader variableHeader,
                              io.netty.buffer.ByteBuf payload)

### Method Detail

#### variableHeader

    public MqttPublishVariableHeader variableHeader()

Overrides:
  `variableHeader` in class `MqttMessage`

#### payload

    public io.netty.buffer.ByteBuf payload()

Overrides:
  `payload` in class `MqttMessage`

#### content

    public io.netty.buffer.ByteBuf content()

Specified by:
  `content` in interface `io.netty.buffer.ByteBufHolder`

#### copy

    public MqttPublishMessage copy()

Specified by:
  `copy` in interface `io.netty.buffer.ByteBufHolder`

#### duplicate

    public MqttPublishMessage duplicate()

Specified by:
  `duplicate` in interface `io.netty.buffer.ByteBufHolder`

#### retainedDuplicate

    public MqttPublishMessage retainedDuplicate()

Specified by:
  `retainedDuplicate` in interface `io.netty.buffer.ByteBufHolder`

#### replace

    public MqttPublishMessage replace(io.netty.buffer.ByteBuf content)

Specified by:
  `replace` in interface `io.netty.buffer.ByteBufHolder`

#### refCnt

    public int refCnt()

Specified by:
  `refCnt` in interface `io.netty.util.ReferenceCounted`

#### retain

    public MqttPublishMessage retain()

Specified by:
  `retain` in interface `io.netty.buffer.ByteBufHolder`
Specified by:
  `retain` in interface `io.netty.util.ReferenceCounted`

#### retain

    public MqttPublishMessage retain(int increment)

Specified by:
  `retain` in interface `io.netty.buffer.ByteBufHolder`
Specified by:
  `retain` in interface `io.netty.util.ReferenceCounted`

#### touch

    public MqttPublishMessage touch()

Specified by:
  `touch` in interface `io.netty.buffer.ByteBufHolder`
Specified by:
  `touch` in interface `io.netty.util.ReferenceCounted`

#### touch

    public MqttPublishMessage touch(Object hint)

Specified by:
  `touch` in interface `io.netty.buffer.ByteBufHolder`
Specified by:
  `touch` in interface `io.netty.util.ReferenceCounted`

#### release

    public boolean release()

Specified by:
  `release` in interface `io.netty.util.ReferenceCounted`

#### release

    public boolean release(int decrement)

Specified by:
  `release` in interface `io.netty.util.ReferenceCounted`