[*] 日常优化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.acgist.taoyao.boot.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -174,6 +175,7 @@ public class Message implements Cloneable, Serializable {
|
||||
* @return this
|
||||
*/
|
||||
public Message setCode(MessageCode messageCode, String message) {
|
||||
Objects.requireNonNull(messageCode, "响应编码不能为空");
|
||||
this.code = messageCode.getCode();
|
||||
this.message = StringUtils.isEmpty(message) ? messageCode.getMessage() : message;
|
||||
return this;
|
||||
|
||||
@@ -25,10 +25,10 @@ public abstract class ProtocolClientAdapter extends ProtocolAdapter {
|
||||
/**
|
||||
* 处理终端信令
|
||||
*
|
||||
* @param clientId 终端标识
|
||||
* @param clientId 终端ID
|
||||
* @param clientType 终端类型
|
||||
* @param client 终端
|
||||
* @param message 消息
|
||||
* @param message 信令消息
|
||||
* @param body 消息主体
|
||||
*/
|
||||
public void execute(String clientId, ClientType clientType, Client client, Message message, Map<String, Object> body) {
|
||||
|
||||
@@ -33,12 +33,11 @@ public abstract class ProtocolControlAdapter extends ProtocolClientAdapter {
|
||||
/**
|
||||
* 处理终端控制信令
|
||||
*
|
||||
* @param clientId 终端标识
|
||||
* @param clientId 终端ID
|
||||
* @param clientType 终端类型
|
||||
* @param room 房间
|
||||
* @param client 终端
|
||||
* @param targetClient 目标
|
||||
* @param message 消息
|
||||
* @param targetClient 目标终端
|
||||
* @param message 信令消息
|
||||
* @param body 消息主体
|
||||
*/
|
||||
public void execute(String clientId, ClientType clientType, Client client, Client targetClient, Message message, Map<String, Object> body) {
|
||||
|
||||
Reference in New Issue
Block a user