Make Subscription class immutable.
This commit is contained in:
@@ -26,17 +26,18 @@ import io.moquette.spi.ISessionsStore.ClientTopicCouple;
|
|||||||
*
|
*
|
||||||
* @author andrea
|
* @author andrea
|
||||||
*/
|
*/
|
||||||
public class Subscription implements Serializable {
|
public final class Subscription implements Serializable {
|
||||||
|
|
||||||
QOSType requestedQos; //max QoS acceptable
|
final QOSType requestedQos; //max QoS acceptable
|
||||||
String clientId;
|
final String clientId;
|
||||||
String topicFilter;
|
final String topicFilter;
|
||||||
boolean active = true;
|
final boolean active;
|
||||||
|
|
||||||
public Subscription(String clientId, String topicFilter, QOSType requestedQos) {
|
public Subscription(String clientId, String topicFilter, QOSType requestedQos) {
|
||||||
this.requestedQos = requestedQos;
|
this.requestedQos = requestedQos;
|
||||||
this.clientId = clientId;
|
this.clientId = clientId;
|
||||||
this.topicFilter = topicFilter;
|
this.topicFilter = topicFilter;
|
||||||
|
this.active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Subscription(Subscription orig) {
|
public Subscription(Subscription orig) {
|
||||||
|
|||||||
Reference in New Issue
Block a user