Android Open Source - iot-starter-for-android Topic Factory






From Project

Back to project page iot-starter-for-android.

License

The source code is released under:

Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECI...

If you think the Android project iot-starter-for-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*******************************************************************************
 * Copyright (c) 2014 IBM Corp./*from w w w . ja  v  a2  s  . c o  m*/
 *
 * 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.
 *
 * Contributors:
 *    Mike Robertson - initial contribution
 *******************************************************************************/
package com.ibm.demo.IoTStarter.utils;

/**
 * Build topic strings used by the application.
 */
public class TopicFactory {
    private final static String TAG = TopicFactory.class.getName();

    /**
     * @param event The event to create a topic string for.
     * @return The event topic for the specified event string.
     */
    public static String getEventTopic(String event) {
        return Constants.EVENT_TOPIC + event + Constants.FORMAT_TOPIC;
    }

    /**
     * @param command The command to create a topic string for.
     * @return The command topic for the specified command string.
     */
    public static String getCommandTopic(String command) {
        return Constants.COMMAND_TOPIC + command + Constants.FORMAT_TOPIC;
    }
}




Java Source Code List

com.ibm.demo.IoTStarter.IoTStarterApplication.java
com.ibm.demo.IoTStarter.activities.MainActivity.java
com.ibm.demo.IoTStarter.activities.ProfilesActivity.java
com.ibm.demo.IoTStarter.fragments.DrawFragment.java
com.ibm.demo.IoTStarter.fragments.IoTFragment.java
com.ibm.demo.IoTStarter.fragments.IoTStarterFragment.java
com.ibm.demo.IoTStarter.fragments.LogFragment.java
com.ibm.demo.IoTStarter.fragments.LoginFragment.java
com.ibm.demo.IoTStarter.utils.ActionListener.java
com.ibm.demo.IoTStarter.utils.Constants.java
com.ibm.demo.IoTStarter.utils.DeviceSensor.java
com.ibm.demo.IoTStarter.utils.IoTProfile.java
com.ibm.demo.IoTStarter.utils.LocationUtils.java
com.ibm.demo.IoTStarter.utils.MessageConductor.java
com.ibm.demo.IoTStarter.utils.MessageFactory.java
com.ibm.demo.IoTStarter.utils.MqttHandler.java
com.ibm.demo.IoTStarter.utils.TopicFactory.java
com.ibm.demo.IoTStarter.views.DrawingView.java