no message
This commit is contained in:
@@ -25,6 +25,17 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://nexus.zhidaoauto.com/repository/maven-releases/'
|
||||
}
|
||||
maven {
|
||||
url 'http://nexus.zhidaoauto.com/repository/maven-public/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation project(path: ':foudations:mogo-passport')
|
||||
@@ -36,5 +47,7 @@ dependencies {
|
||||
implementation project(":foudations:mogo-socket")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
}
|
||||
implementation 'com.elegant.spi:api:1.0.9' //运行时库
|
||||
annotationProcessor 'com.elegant.spi:compiler:1.0.3' //编译时库
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mogo.realtime.Imp;
|
||||
|
||||
|
||||
import com.elegant.spi.AbstractDelegateManager;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.realtime.Interface.RealTimeProvider;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
* @description 描述
|
||||
* @since: 2021/1/25
|
||||
*/
|
||||
class RealTimeDelegateManager extends AbstractDelegateManager<RealTimeProvider> {
|
||||
private static RealTimeDelegateManager sInstance = null;
|
||||
private Class<? extends RealTimeProvider> mRealTimeProvider = null;
|
||||
|
||||
public static RealTimeDelegateManager getInstance() {
|
||||
if (sInstance == null) {
|
||||
synchronized (RealTimeDelegateManager.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new RealTimeDelegateManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public RealTimeDelegateManager() {
|
||||
loadDelegateClasses(MoGoAiCloudClient.getInstance().getContext(), RealTimeProvider.class, new DelegateListener<Class<? extends RealTimeProvider>>() {
|
||||
@Override
|
||||
public void onDelegate(String unit, Class<? extends RealTimeProvider> p) {
|
||||
mRealTimeProvider = p;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user