cn.hippo4j.common.toolkit.MessageConvert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hippo4j-common Show documentation
Show all versions of hippo4j-common Show documentation
HIPPO4J、HIPPO4J-CORE 公共代码库.
package cn.hippo4j.common.toolkit;
import cn.hippo4j.common.monitor.AbstractMessage;
import cn.hippo4j.common.monitor.Message;
import cn.hippo4j.common.monitor.MessageWrapper;
import cn.hutool.core.bean.BeanUtil;
import lombok.SneakyThrows;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Message convert.
*
* @author chen.ma
* @date 2021/12/10 21:27
*/
public class MessageConvert {
/**
* {@link Message} to {@link MessageWrapper}.
*
* @param message
* @return
*/
public static MessageWrapper convert(Message message) {
MessageWrapper wrapper = new MessageWrapper();
wrapper.setResponseClass(message.getClass());
wrapper.setMessageType(message.getMessageType());
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy