public class ParcelableMqttMessage
extends org.eclipse.paho.client.mqttv3.MqttMessage
A way to flow MqttMessages via Bundles/Intents
An application will probably use this only when receiving a message from a Service in a Bundle - the necessary code will be something like this :-
private void messageArrivedAction(Bundle data) {
ParcelableMqttMessage message = (ParcelableMqttMessage) data
.getParcelable(MqttServiceConstants.CALLBACK_MESSAGE_PARCEL);
Use the normal MqttMessage
methods on the the message object.
}
It is unlikely that an application will directly use the methods which are specific to this class.
Modifier and Type | Field and Description |
---|---|
static |
CREATOR
A creator which creates the message object from a parcel
|
(package private) java.lang.String |
messageId |
Constructor and Description |
---|
ParcelableMqttMessage(org.eclipse.paho.client.mqttv3.MqttMessage original) |
ParcelableMqttMessage(Parcel parcel) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describes the contents of this object
|
java.lang.String |
getMessageId() |
void |
writeToParcel(Parcel parcel,
int flags)
Writes the contents of this object to a parcel
|
java.lang.String messageId
public static finalCREATOR
ParcelableMqttMessage(org.eclipse.paho.client.mqttv3.MqttMessage original)
ParcelableMqttMessage(Parcel parcel)
public java.lang.String getMessageId()
public int describeContents()
public void writeToParcel(Parcel parcel, int flags)
parcel
- The parcel to write the data to.flags
- this parameter is ignored