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

com.godmao.mqbroker.message.MultipleMessage Maven / Gradle / Ivy

package com.godmao.mqbroker.message;

import java.util.List;

/**
 * 服务器消息 - 多服务消息
 */
public class MultipleMessage {
    public static final byte cmd = 11;

    private MultipleMessage() {
    }

    public static class Request {
        private final byte         model; // 消息模型  1 负载均衡/默认轮训策略/LOADBALANCE  2 广播/BROADCASTING
        private final long         delay; // 延时
        private final List topics; // 主题
        private final List datas;  // 消息

        public Request(byte model, long delay, List topics, List datas) {
            this.model = model;
            this.delay = delay;
            this.datas = datas;
            this.topics = topics;
        }

        public byte getCmd() {
            return cmd;
        }

        public byte getModel() {
            return model;
        }

        public long getDelay() {
            return delay;
        }

        public List getTopics() {
            return topics;
        }

        public List getDatas() {
            return datas;
        }
    }

    public static class Response {
        private final List topics; // 主题
        private final List datas;  // 消息

        public Response(List topics, List datas) {
            this.topics = topics;
            this.datas = datas;
        }

        public byte getCmd() {
            return cmd;
        }

        public List getTopics() {
            return topics;
        }

        public List getDatas() {
            return datas;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy