wait to finish TimeDelayUploadServer
This commit is contained in:
@@ -0,0 +1,46 @@
|
|||||||
|
package com.mogo.module.service.timedelay;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.mogo.module.common.MogoApisHandler;
|
||||||
|
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收服务端模拟定位数据,对下发数据做实时Post上报,统计时延
|
||||||
|
*/
|
||||||
|
public class TimeDelayUploadManager implements IMogoOnMessageListener {
|
||||||
|
|
||||||
|
private volatile static TimeDelayUploadManager timeDelayUploadManager;
|
||||||
|
private static final int MSG_SOCKET_TYPE = 403000;
|
||||||
|
|
||||||
|
private TimeDelayUploadManager() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeDelayUploadManager getInstance() {
|
||||||
|
if (timeDelayUploadManager == null) {
|
||||||
|
synchronized (TimeDelayUploadManager.class) {
|
||||||
|
if (timeDelayUploadManager == null) {
|
||||||
|
timeDelayUploadManager = new TimeDelayUploadManager();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return timeDelayUploadManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(Context mContext) {
|
||||||
|
MogoApisHandler.getInstance()
|
||||||
|
.getApis()
|
||||||
|
.getSocketManagerApi(mContext).registerOnMessageListener(MSG_SOCKET_TYPE,this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class target() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMsgReceived(Object obj) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user