socket change
This commit is contained in:
@@ -2,15 +2,13 @@ package com.mogo.realtime.Interface;
|
||||
|
||||
import com.mogo.realtime.entity.ADASRecognizedResult;
|
||||
import com.mogo.realtime.entity.CloudLocationInfo;
|
||||
import com.mogo.realtime.socket.IMogoCloudOnMsgListener;
|
||||
import com.mogo.realtime.util.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 蘑菇AI云平台实时定位点上报服务接口
|
||||
*/
|
||||
public interface RealTimeProvider {
|
||||
public interface IRealTimeProvider {
|
||||
|
||||
/**
|
||||
* 获取 adas 识别列表,由外部传入
|
||||
@@ -3,14 +3,14 @@ package com.mogo.realtime.spi;
|
||||
|
||||
import com.elegant.spi.AbstractDelegateManager;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.realtime.Interface.RealTimeProvider;
|
||||
import com.mogo.realtime.Interface.IRealTimeProvider;
|
||||
|
||||
/**
|
||||
* 提供RealTime SPI接口实例对象管理类
|
||||
*/
|
||||
class RealTimeProviderDelegateManager extends AbstractDelegateManager<RealTimeProvider> {
|
||||
class RealTimeProviderDelegateManager extends AbstractDelegateManager<IRealTimeProvider> {
|
||||
private static RealTimeProviderDelegateManager sInstance = null;
|
||||
private RealTimeProvider mRealTimeProvider = null;
|
||||
private IRealTimeProvider mRealTimeProvider = null;
|
||||
|
||||
public static RealTimeProviderDelegateManager getInstance() {
|
||||
if (sInstance == null) {
|
||||
@@ -24,15 +24,11 @@ class RealTimeProviderDelegateManager extends AbstractDelegateManager<RealTimePr
|
||||
}
|
||||
|
||||
public RealTimeProviderDelegateManager() {
|
||||
loadDelegates(MoGoAiCloudClient.getInstance().getContext(), RealTimeProvider.class, new DelegateListener<RealTimeProvider>() {
|
||||
@Override
|
||||
public void onDelegate(String unit, RealTimeProvider p) {
|
||||
mRealTimeProvider = p;
|
||||
}
|
||||
});
|
||||
loadDelegates(MoGoAiCloudClient.getInstance().getContext(), IRealTimeProvider.class, (unit, p)
|
||||
-> mRealTimeProvider = p);
|
||||
}
|
||||
|
||||
public RealTimeProvider getRealTimeProvider(){
|
||||
public IRealTimeProvider getRealTimeProvider(){
|
||||
return mRealTimeProvider;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.realtime.spi;
|
||||
|
||||
import com.mogo.realtime.Interface.RealTimeProvider;
|
||||
import com.mogo.realtime.Interface.IRealTimeProvider;
|
||||
import com.mogo.realtime.entity.ADASRecognizedResult;
|
||||
import com.mogo.realtime.entity.CloudLocationInfo;
|
||||
|
||||
@@ -9,10 +9,10 @@ import java.util.List;
|
||||
/**
|
||||
* RealTime Provider SPI 单例对象
|
||||
*/
|
||||
public class RealTimeProviderImp implements RealTimeProvider {
|
||||
public class RealTimeProviderImp implements IRealTimeProvider {
|
||||
|
||||
private static volatile RealTimeProviderImp sInstance = null;
|
||||
private final RealTimeProvider mDelegate;
|
||||
private final IRealTimeProvider mDelegate;
|
||||
|
||||
public static RealTimeProviderImp getInstance() {
|
||||
if (sInstance == null) {
|
||||
|
||||
Reference in New Issue
Block a user