org.eclipse.paho.android.service.MqttServiceBinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.eclipse.paho.android.service Show documentation
Show all versions of org.eclipse.paho.android.service Show documentation
The Paho project provides scalable open-source implementations of open and standard messaging protocols aimed at new, existing, and emerging applications for Machine to Machine (M2M) and Internet of Things (IoT).
/*******************************************************************************
* Copyright (c) 1999, 2014 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*/
package org.eclipse.paho.android.service;
import android.os.Binder;
/**
* What the Service passes to the Activity on binding:-
*
* - a reference to the Service
*
- the activityToken provided when the Service was started
*
*
*/
class MqttServiceBinder extends Binder {
private MqttService mqttService;
private String activityToken;
MqttServiceBinder(MqttService mqttService) {
this.mqttService = mqttService;
}
/**
* @return a reference to the Service
*/
public MqttService getService() {
return mqttService;
}
void setActivityToken(String activityToken) {
this.activityToken = activityToken;
}
/**
* @return the activityToken provided when the Service was started
*/
public String getActivityToken() {
return activityToken;
}
}