Command.java 640 Bytes
package com.example.mina.client.entity;

import com.example.mina.server.util.LogUtils;
import lombok.Builder;
import lombok.Data;

/**
 * @author dy
 * @date 2021/03/10
 */
@Data
@Builder
public class Command {
    private String description;
    private byte[] bytes;
    private String host;
    private int port;

    public Command(String description, byte[] bytes, String host, int port) {
        this.description = description;
        this.bytes = bytes;
        this.host = host;
        this.port = port;
    }

    @Override
    public String toString() {
        return description + " " + LogUtils.toHexString(bytes);
    }

}