NotifyMessageManager.java 641 Bytes
Newer Older
李晓兵's avatar
李晓兵 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
package com.hand.face.utils;

import com.hand.face.myinterface.NotifyMessage;

/**
 * Created by USER on 2016/12/14.
 */
public class NotifyMessageManager {
    private static NotifyMessageManager notify;
    private NotifyMessage listener;
    private NotifyMessageManager(){

    }
    public static synchronized NotifyMessageManager getInstance() {
        if (notify == null) {
            notify = new NotifyMessageManager();
        }
        return notify;
    }
    public void setNotifyMessage(NotifyMessage nm){
        listener = nm;
    }
    public void sendNotifyMessage(String msg){
        listener.sendMessage(msg);
    }
}