// Path: utils/src/main/java/co/flyver/utils/flyverMQ/exceptions/NoSuchTopicException.java
// public class NoSuchTopicException extends Exception {
//     public NoSuchTopicException(String detailMessage) {
//         super(detailMessage);
//     }
// }
// 
// Path: utils/src/main/java/co/flyver/utils/flyverMQ/exceptions/ProducerAlreadyRegisteredException.java
// public class ProducerAlreadyRegisteredException extends Exception {
//     public ProducerAlreadyRegisteredException(String detailMessage) {
//         super(detailMessage);
//     }
// }


import co.flyver.utils.flyverMQ.exceptions.NoSuchTopicException;
import co.flyver.utils.flyverMQ.exceptions.ProducerAlreadyRegisteredException;
package co.flyver.utils.flyverMQ;


/**
 * Created by Petar Petrov on 1/12/15.
 */

/**
 * Abstract class implementing MQ producer functionallity
 * Every producer must subclass it before registering for the message queue
 */
public abstract class FlyverMQProducer {
    final String TAG = "Producers";
    String topic;
    boolean registered = false;

    protected FlyverMQProducer() {

    }

    public FlyverMQProducer(String topic) {
        this.topic = topic;
    }

    public void addMessage(FlyverMQMessage msg) {
        if(registered) {
            try {
                FlyverMQ.getInstance().addMessage(this, msg);
// Path: utils/src/main/java/co/flyver/utils/flyverMQ/exceptions/NoSuchTopicException.java
// public class NoSuchTopicException extends Exception {
//     public NoSuchTopicException(String detailMessage) {
//         super(detailMessage);
//     }
// }
// 
// Path: utils/src/main/java/co/flyver/utils/flyverMQ/exceptions/ProducerAlreadyRegisteredException.java
// public class ProducerAlreadyRegisteredException extends Exception {
//     public ProducerAlreadyRegisteredException(String detailMessage) {
//         super(detailMessage);
//     }
// }


// Path: utils/src/main/java/co/flyver/utils/flyverMQ/FlyverMQProducer.java
import co.flyver.utils.flyverMQ.exceptions.NoSuchTopicException;
import co.flyver.utils.flyverMQ.exceptions.ProducerAlreadyRegisteredException;

package co.flyver.utils.flyverMQ;


/**
 * Created by Petar Petrov on 1/12/15.
 */

/**
 * Abstract class implementing MQ producer functionallity
 * Every producer must subclass it before registering for the message queue
 */
public abstract class FlyverMQProducer {
    final String TAG = "Producers";
    String topic;
    boolean registered = false;

    protected FlyverMQProducer() {

    }

    public FlyverMQProducer(String topic) {
        this.topic = topic;
    }

    public void addMessage(FlyverMQMessage msg) {
        if(registered) {
            try {
                FlyverMQ.getInstance().addMessage(this, msg);
            } catch (NoSuchTopicException e) {