2017-02-01 15:16:13 +01:00
|
|
|
|
2016-03-03 17:47:30 -08:00
|
|
|
package io.moquette.interception.messages;
|
|
|
|
|
|
|
|
|
|
import io.moquette.spi.impl.subscriptions.Subscription;
|
2017-01-28 10:06:30 +01:00
|
|
|
import io.netty.handler.codec.mqtt.MqttQoS;
|
2016-03-03 17:47:30 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author Wagner Macedo
|
|
|
|
|
*/
|
2017-01-10 17:06:13 +01:00
|
|
|
public class InterceptSubscribeMessage implements InterceptMessage {
|
2017-02-01 15:16:13 +01:00
|
|
|
|
2016-03-03 17:47:30 -08:00
|
|
|
private final Subscription subscription;
|
|
|
|
|
private final String username;
|
|
|
|
|
|
|
|
|
|
public InterceptSubscribeMessage(Subscription subscription, String username) {
|
|
|
|
|
this.subscription = subscription;
|
|
|
|
|
this.username = username;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getClientID() {
|
|
|
|
|
return subscription.getClientId();
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-28 10:06:30 +01:00
|
|
|
public MqttQoS getRequestedQos() {
|
2016-03-03 17:47:30 -08:00
|
|
|
return subscription.getRequestedQos();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getTopicFilter() {
|
|
|
|
|
return subscription.getTopicFilter();
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-01 15:16:13 +01:00
|
|
|
public String getUsername() {
|
|
|
|
|
return username;
|
|
|
|
|
}
|
2016-03-03 17:47:30 -08:00
|
|
|
}
|