com.github.lontime.extredisson.common.MessageWithId Maven / Gradle / Ivy
The newest version!
package com.github.lontime.extredisson.common;
import com.github.lontime.base.serial.model.Message;
/**
* MessageWithId.
* @author lontime
* @since 1.0
*/
public class MessageWithId {
private final Message message;
private final String id;
public MessageWithId(String id, Message message) {
this.id = id;
this.message = message;
}
public Message getMessage() {
return message;
}
public String getId() {
return id;
}
public String serviceName() {
return message.getServiceName();
}
public static MessageWithId create(String id, Message message) {
return new MessageWithId(id, message);
}
}