com.ibm.iotf.client.gateway.Notification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of watson-iot Show documentation
Show all versions of watson-iot Show documentation
IBM Watson IoT client library to simplify device/gateway/application interactions with the IoT Platform
The newest version!
/**
*****************************************************************************
* Copyright (c) 2016 IBM Corporation and other Contributors.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Sathiskumar Palaniappan - Initial Contribution
*****************************************************************************
*/
package com.ibm.iotf.client.gateway;
import java.io.UnsupportedEncodingException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import com.ibm.iotf.client.Message;
/**
* The Notification class
*/
public class Notification {
private String type;
private String id;
private MqttMessage message;
/**
* Note that this class does not have a default constructor
* @param type
* Object of String which denotes command type
* @param id
* Object of String which denotes command id
* @param msg
* Object of MqttMessage which denotes actual message
* @throws UnsupportedEncodingException When the format is not UTF-8
*
*/
public Notification(String type, String id, MqttMessage msg) throws UnsupportedEncodingException{
this.type = type;
this.id = id;
this.message = msg;
}
public String getDeviceType() {
return type;
}
public String getDeviceId() {
return id;
}
public MqttMessage getMessage() {
return message;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy