Line data Source code
1 : /*
2 : * Package : mqtt_client
3 : * Author : S. Hamblett <steve.hamblett@linux.com>
4 : * Date : 31/05/2017
5 : * Copyright : S.Hamblett
6 : */
7 :
8 : part of mqtt_client;
9 :
10 : /// Represents a MQTT message that has been received from a broker.
11 : class MqttReceivedMessage<T> extends ChangeRecord {
12 : /// The topic the message was received on.
13 : String topic;
14 :
15 : /// The payload of the message received.
16 : T payload;
17 :
18 : /// Initializes a new instance of an MqttReceivedMessage class.
19 1 : MqttReceivedMessage(String topic, T payload) {
20 1 : this.topic = topic;
21 1 : this.payload = payload;
22 : }
23 : }
|