[V2X]修正联调过程中遇到的问题
This commit is contained in:
@@ -12,17 +12,14 @@ import com.elegant.log.simplelog.Logger;
|
||||
import com.elegant.network.utils.GsonUtil;
|
||||
import com.google.protobuf.ByteString;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.google.protobuf.Message;
|
||||
import com.google.protobuf.MessageOrBuilder;
|
||||
import com.google.protobuf.MessageLiteOrBuilder;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.socket.entity.MsgBody;
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
import com.mogo.cloud.socket.internal.InternalSocketManager;
|
||||
import com.mogo.cloud.socket.third.ThirdSocketManager;
|
||||
import com.zhidao.ptech.connsvr.protocol.MogoConnsvr;
|
||||
import com.zhidao.socket.ConnectionLifecycleListener;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -164,22 +161,22 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
Object obj = null;
|
||||
while (iterator.hasNext()) {
|
||||
IMogoCloudSocketOnMessageListener listener = iterator.next();
|
||||
if (payload.getPayload() != null) {
|
||||
ByteString p = payload.getPayload();
|
||||
if (p != null) {
|
||||
Class clz = listener.target(msgType);
|
||||
if (MessageOrBuilder.class.isAssignableFrom(clz)) {
|
||||
if (MessageLiteOrBuilder.class.isAssignableFrom(clz)) {
|
||||
try {
|
||||
Constructor c = clz.getDeclaredConstructor(Void.class);
|
||||
Constructor c = clz.getDeclaredConstructor();
|
||||
if (c != null) {
|
||||
c.setAccessible(true);
|
||||
MessageOrBuilder o = (MessageOrBuilder)c.newInstance();
|
||||
o.getDefaultInstanceForType().getParserForType().parseFrom(payload.getPayload());
|
||||
obj = o;
|
||||
MessageLiteOrBuilder o = (MessageLiteOrBuilder)c.newInstance();
|
||||
obj = o.getDefaultInstanceForType().getParserForType().parseFrom(p);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
Log.e(TAG, Log.getStackTraceString(t));
|
||||
}
|
||||
} else {
|
||||
obj = GsonUtil.objectFromJson(payload.getPayload().toStringUtf8(), listener.target(msgType));
|
||||
obj = GsonUtil.objectFromJson(p.toStringUtf8(), listener.target(msgType));
|
||||
}
|
||||
}
|
||||
if (listener != null && obj != null) {
|
||||
|
||||
@@ -36,26 +36,26 @@ PASSWORD=xintai2018
|
||||
RELEASE=true
|
||||
# AI CLOUD 云平台
|
||||
# 工具类
|
||||
MOGO_UTILS_VERSION=1.4.1
|
||||
MOGO_UTILS_VERSION=1.4.2
|
||||
# 网络请求
|
||||
MOGO_NETWORK_VERSION=1.4.1
|
||||
MOGO_NETWORK_VERSION=1.4.2
|
||||
# 网络DNS
|
||||
MOGO_HTTPDNS_VERSION=1.4.1
|
||||
MOGO_HTTPDNS_VERSION=1.4.2
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.1
|
||||
MOGO_PASSPORT_VERSION=1.4.2
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.4.1
|
||||
MOGO_SOCKET_VERSION=1.4.2
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.1
|
||||
MOGO_REALTIME_VERSION=1.4.2
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.4.1
|
||||
MOGO_TANLU_VERSION=1.4.2
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.1
|
||||
MOGO_LIVE_VERSION=1.4.2
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.1
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.2
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.1
|
||||
MOGO_LOCATION_VERSION=1.4.2
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.1
|
||||
MOGO_TELEMATIC_VERSION=1.4.2
|
||||
# v2x
|
||||
MOGO_V2X_VERSION=1.4.1
|
||||
MOGO_V2X_VERSION=1.4.2
|
||||
|
||||
Reference in New Issue
Block a user