All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.feingto.iot.common.model.custom.Message Maven / Gradle / Ivy

There is a newer version: 2.3.3.RELEASE
Show newest version
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