com.feingto.iot.common.model.custom.Message Maven / Gradle / Ivy
package com.feingto.iot.common.model.custom;
import com.feingto.iot.common.model.enums.MessageType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 消息包
*
* @author longfei
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true)
public class Message extends BaseMessage {
private static final long serialVersionUID = -2354834174075786980L;
/**
* 内容体
*/
private String content;
public Message() {
super();
this.protocol(MessageType.MESSAGE.getValue());
}
public int getLength() {
return content.getBytes().length;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy