com.iteaj.iot.client.mqtt.impl.DefaultMqttSubscribeProtocol Maven / Gradle / Ivy
package com.iteaj.iot.client.mqtt.impl;
import com.iteaj.iot.ProtocolType;
import com.iteaj.iot.client.protocol.ServerInitiativeProtocol;
import io.netty.handler.codec.mqtt.MqttQoS;
public class DefaultMqttSubscribeProtocol extends ServerInitiativeProtocol {
private String topic;
private MqttQoS qoS;
public DefaultMqttSubscribeProtocol(DefaultMqttMessage requestMessage) {
super(requestMessage);
}
@Override
protected void doBuildRequestMessage(DefaultMqttMessage requestMessage) {
this.qoS = requestMessage.getQos();
this.topic = requestMessage.getTopic();
}
@Override
protected DefaultMqttMessage doBuildResponseMessage() {
return null;
}
@Override
public ProtocolType protocolType() {
return DefaultMqttProtocolType.Subscribe;
}
public String getTopic() {
return topic;
}
public MqttQoS getQoS() {
return qoS;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy