1
This commit is contained in:
42
mqtt/org/eclipse/paho/mqttv5/client/BufferedMessage.java
Normal file
42
mqtt/org/eclipse/paho/mqttv5/client/BufferedMessage.java
Normal file
@@ -0,0 +1,42 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2016 IBM Corp.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v2.0
|
||||
* and Eclipse Distribution License v1.0 which accompany this distribution.
|
||||
*
|
||||
* The Eclipse Public License is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0
|
||||
* and the Eclipse Distribution License is available at
|
||||
* https://www.eclipse.org/org/documents/edl-v10.php
|
||||
*
|
||||
* Contributors:
|
||||
* James Sutton - Initial Contribution for Automatic Reconnect & Offline Buffering
|
||||
*/
|
||||
package org.eclipse.paho.mqttv5.client;
|
||||
|
||||
import org.eclipse.paho.mqttv5.common.packet.MqttWireMessage;
|
||||
|
||||
/**
|
||||
* A BufferedMessage contains an MqttWire Message and token
|
||||
* it allows both message and token to be buffered when the client
|
||||
* is in resting state
|
||||
*/
|
||||
public class BufferedMessage {
|
||||
|
||||
private MqttWireMessage message;
|
||||
private MqttToken token;
|
||||
|
||||
public BufferedMessage(MqttWireMessage message, MqttToken token){
|
||||
this.message = message;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public MqttWireMessage getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public MqttToken getToken() {
|
||||
return token;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user