[add] 添加云公告注册java文件

This commit is contained in:
liujing
2021-10-27 16:07:32 +08:00
parent 9afd58ae5d
commit 0dd56e641b
6 changed files with 60 additions and 38 deletions

View File

@@ -1,9 +1,27 @@
package com.mogo.eagle.core.function.call.notice;
import com.mogo.eagle.core.function.api.notice.IMoGoNoticeListener;
import com.mogo.eagle.core.function.call.base.CallerBase;
import java.util.HashMap;
/**
* @author xiaoyuzhou
* @date 2021/9/18 11:48 上午
* 云端公告、通知类的 调用者管理这里对外及其他模块提供功能的调用用啥写啥不要过度设计不允许直接将Provider暴露出去
*/
public class CallerNoticeManager {
public class CallerNoticeManager extends CallerBase {
private HashMap<String, IMoGoNoticeListener> mListeners = new HashMap<>();
/**
* 添加监听者
*/
void addListener(String tag, IMoGoNoticeListener listener) {
mListeners.put(tag, listener);
}
/**
* 移除监听者
*/
void removeListener(String tag) {
mListeners.remove(tag);
}
}