[add] 添加云公告注册java文件
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user