Java Code Examples for com.akaxin.proto.core.CoreProto#MsgStatus
The following examples show how to use
com.akaxin.proto.core.CoreProto#MsgStatus .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractU2Handler.java From openzaly with Apache License 2.0 | 6 votes |
/** * <pre> * status=1:发送成功 * status=0:默认发送失败状态 * status=-1:非好友,不能发送 * status=-2:非群成员,发送失败 * </pre> */ protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 2
Source File: AbstractSyncHandler.java From openzaly with Apache License 2.0 | 6 votes |
/** * <pre> * status=1:发送成功 * status=0:默认发送失败状态 * status=-1:非好友,不能发送 * status=-2:非群成员,发送失败 * </pre> */ protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 3
Source File: AbstractSyncHandler.java From openzaly with Apache License 2.0 | 6 votes |
/** * <pre> * status=1:发送成功 * status=0:默认发送失败状态 * status=-1:非好友,不能发送 * status=-2:非群成员,发送失败 * </pre> */ protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 4
Source File: GroupMessageImageSecretHandler.java From openzaly with Apache License 2.0 | 6 votes |
private void msgResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(0, statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }
Example 5
Source File: AbstractGroupHandler.java From openzaly with Apache License 2.0 | 6 votes |
protected void msgStatusResponse(Command command, String msgId, long msgTime, int statusValue) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(statusValue) .setMsgServerTime(msgTime).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 6
Source File: GroupMessageImageSecretHandler.java From openzaly with Apache License 2.0 | 6 votes |
private void msgResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(0, statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }
Example 7
Source File: AbstractGroupHandler.java From openzaly with Apache License 2.0 | 6 votes |
protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 8
Source File: AbstractU2Handler.java From openzaly with Apache License 2.0 | 6 votes |
/** * 通过channel回执消息状态 */ @Deprecated protected void msgStatusResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }
Example 9
Source File: AbstractU2Handler.java From openzaly with Apache License 2.0 | 6 votes |
protected void msgStatusResponse(Command command, String msgId, long msgTime, int statusValue) { if (command == null || StringUtils.isAnyEmpty(command.getDeviceId(), msgId)) { return; } CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(statusValue) .setMsgServerTime(msgTime).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 10
Source File: AbstractU2Handler.java From wind-im with Apache License 2.0 | 6 votes |
/** * <pre> * status=1:发送成功 * status=0:默认发送失败状态 * status=-1:非好友,不能发送 * status=-2:非群成员,发送失败 * </pre> */ protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 11
Source File: AbstractU2Handler.java From openzaly with Apache License 2.0 | 6 votes |
/** * 通过channel回执消息状态 */ @Deprecated protected void msgStatusResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }
Example 12
Source File: AbstractSyncHandler.java From wind-im with Apache License 2.0 | 6 votes |
/** * <pre> * status=1:发送成功 * status=0:默认发送失败状态 * status=-1:非好友,不能发送 * status=-2:非群成员,发送失败 * </pre> */ protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 13
Source File: GroupMessageImageSecretHandler.java From wind-im with Apache License 2.0 | 6 votes |
private void msgResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(0, statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }
Example 14
Source File: GroupMessageTextSecretHandler.java From wind-im with Apache License 2.0 | 6 votes |
private void msgResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(0, statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }
Example 15
Source File: AbstractGroupHandler.java From openzaly with Apache License 2.0 | 6 votes |
protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 16
Source File: AbstractU2Handler.java From openzaly with Apache License 2.0 | 6 votes |
/** * <pre> * status=1:发送成功 * status=0:默认发送失败状态 * status=-1:非好友,不能发送 * status=-2:非群成员,发送失败 * </pre> */ protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 17
Source File: AbstractGroupHandler.java From wind-im with Apache License 2.0 | 6 votes |
protected void msgStatusResponse(Command command, String msgId, long msgTime, boolean success) { if (command == null || StringUtils.isEmpty(command.getDeviceId())) { return; } int statusValue = success ? 1 : 0; CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(statusValue).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 18
Source File: AbstractU2Handler.java From wind-im with Apache License 2.0 | 6 votes |
/** * 通过channel回执消息状态 */ @Deprecated protected void msgStatusResponse(Channel channel, Command command, String from, String to, String msgId, long msgTime) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgServerTime(msgTime) .setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }
Example 19
Source File: AbstractU2Handler.java From wind-im with Apache License 2.0 | 6 votes |
protected void msgStatusResponse(Command command, String msgId, long msgTime, int statusValue) { if (command == null || StringUtils.isAnyEmpty(command.getDeviceId(), msgId)) { return; } CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(statusValue) .setMsgServerTime(msgTime).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); ChannelWriter.writeByDeviceId(command.getDeviceId(), new RedisCommand().add(CommandConst.PROTOCOL_VERSION) .add(CommandConst.IM_MSG_TOCLIENT).add(data.toByteArray())); }
Example 20
Source File: GroupMessageVoiceSecretHandler.java From openzaly with Apache License 2.0 | 4 votes |
private void msgResponse(Channel channel, Command command, String from, String to, String msgId) { CoreProto.MsgStatus status = CoreProto.MsgStatus.newBuilder().setMsgId(msgId).setMsgStatus(1).build(); ImStcMessageProto.MsgWithPointer statusMsg = ImStcMessageProto.MsgWithPointer.newBuilder() .setType(MsgType.MSG_STATUS).setStatus(status).build(); ImStcMessageProto.ImStcMessageRequest request = ImStcMessageProto.ImStcMessageRequest.newBuilder() .addList(0, statusMsg).build(); CoreProto.TransportPackageData data = CoreProto.TransportPackageData.newBuilder() .setData(request.toByteString()).build(); channel.writeAndFlush(new RedisCommand().add(CommandConst.PROTOCOL_VERSION).add(CommandConst.IM_MSG_TOCLIENT) .add(data.toByteArray())); }