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
36 lines
876 B
Java
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;
|
|
}
|
|
}
|