Files
IM-server-new/broker/src/main/java/io/moquette/interception/messages/InterceptSubscribeMessage.java
T
Andreas Mager a2e51b2c31 broker/Topic: class added
broker/Topic: String Topics replaced by Topic class
broker/Topic#parseTopic: access set to private
broker/SubscriptionsStoreTest: topic tests moved to own class
broker/TopicTest: containsExactly used
broker/TopicTest: TopicAssert class added
broker/TopicTest$TopicAssert#containsToken: method added
broker/TopicTest$TopicAssert#matches: method added
2017-02-19 18:29:37 +01:00

36 lines
876 B
Java

package io.moquette.interception.messages;
import io.moquette.spi.impl.subscriptions.Subscription;
import io.netty.handler.codec.mqtt.MqttQoS;
/**
* @author Wagner Macedo
*/
public class InterceptSubscribeMessage implements InterceptMessage {
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();
}
public MqttQoS getRequestedQos() {
return subscription.getRequestedQos();
}
public String getTopicFilter() {
return subscription.getTopicFilter().toString();
}
public String getUsername() {
return username;
}
}