2016-06-28 17:27:35 +02:00
|
|
|
package io.moquette.interception;
|
|
|
|
|
|
2016-07-22 13:19:16 +02:00
|
|
|
import io.moquette.interception.messages.InterceptPublishMessage;
|
|
|
|
|
|
2016-06-28 17:27:35 +02:00
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by mackristof on 28/05/2016.
|
|
|
|
|
*/
|
2016-07-22 12:09:10 +02:00
|
|
|
public class HazelcastMsg implements Serializable {
|
2016-06-28 17:27:35 +02:00
|
|
|
|
2017-01-11 10:16:58 +01:00
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
private final String clientId;
|
2016-06-28 17:27:35 +02:00
|
|
|
private final byte qos;
|
2016-06-28 22:07:54 +02:00
|
|
|
private final byte[] payload;
|
2016-06-28 17:27:35 +02:00
|
|
|
private final String topic;
|
|
|
|
|
|
2016-07-22 13:19:16 +02:00
|
|
|
public HazelcastMsg(InterceptPublishMessage msg) {
|
|
|
|
|
this.clientId = msg.getClientID();
|
|
|
|
|
this.topic = msg.getTopicName();
|
|
|
|
|
this.qos = msg.getQos().byteValue();
|
|
|
|
|
this.payload = msg.getPayload().array();
|
2016-06-28 17:27:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getClientId() {
|
|
|
|
|
return clientId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public byte getQos() {
|
|
|
|
|
return qos;
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-28 22:07:54 +02:00
|
|
|
public byte[] getPayload() {
|
2016-06-28 17:27:35 +02:00
|
|
|
return payload;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getTopic() {
|
|
|
|
|
return topic;
|
|
|
|
|
}
|
|
|
|
|
}
|