package com.qianwen.core.websocket.distribute;
|
|
import java.util.List;
|
|
public class MessageDO {
|
private Boolean needBroadcast;
|
private List<Object> sessionKeys;
|
private List<String> sessionIds;
|
private String messageText;
|
|
public MessageDO setNeedBroadcast(final Boolean needBroadcast) {
|
this.needBroadcast = needBroadcast;
|
return this;
|
}
|
|
public MessageDO setSessionKeys(final List<Object> sessionKeys) {
|
this.sessionKeys = sessionKeys;
|
return this;
|
}
|
|
public MessageDO setSessionIds(final List<String> sessionIds) {
|
this.sessionIds = sessionIds;
|
return this;
|
}
|
|
public MessageDO setMessageText(final String messageText) {
|
this.messageText = messageText;
|
return this;
|
}
|
|
public boolean equals(final Object o) {
|
if (o == this) {
|
return true;
|
}
|
if (o instanceof MessageDO) {
|
MessageDO other = (MessageDO) o;
|
if (other.canEqual(this)) {
|
Object this$needBroadcast = getNeedBroadcast();
|
Object other$needBroadcast = other.getNeedBroadcast();
|
if (this$needBroadcast == null) {
|
if (other$needBroadcast != null) {
|
return false;
|
}
|
} else if (!this$needBroadcast.equals(other$needBroadcast)) {
|
return false;
|
}
|
Object this$sessionKeys = getSessionKeys();
|
Object other$sessionKeys = other.getSessionKeys();
|
if (this$sessionKeys == null) {
|
if (other$sessionKeys != null) {
|
return false;
|
}
|
} else if (!this$sessionKeys.equals(other$sessionKeys)) {
|
return false;
|
}
|
Object this$sessionIds = getSessionIds();
|
Object other$sessionIds = other.getSessionIds();
|
if (this$sessionIds == null) {
|
if (other$sessionIds != null) {
|
return false;
|
}
|
} else if (!this$sessionIds.equals(other$sessionIds)) {
|
return false;
|
}
|
Object this$messageText = getMessageText();
|
Object other$messageText = other.getMessageText();
|
return this$messageText == null ? other$messageText == null : this$messageText.equals(other$messageText);
|
}
|
return false;
|
}
|
return false;
|
}
|
|
protected boolean canEqual(final Object other) {
|
return other instanceof MessageDO;
|
}
|
|
public int hashCode() {
|
Object $needBroadcast = getNeedBroadcast();
|
int result = (1 * 59) + ($needBroadcast == null ? 43 : $needBroadcast.hashCode());
|
Object $sessionKeys = getSessionKeys();
|
int result2 = (result * 59) + ($sessionKeys == null ? 43 : $sessionKeys.hashCode());
|
Object $sessionIds = getSessionIds();
|
int result3 = (result2 * 59) + ($sessionIds == null ? 43 : $sessionIds.hashCode());
|
Object $messageText = getMessageText();
|
return (result3 * 59) + ($messageText == null ? 43 : $messageText.hashCode());
|
}
|
|
public String toString() {
|
return "MessageDO(needBroadcast=" + getNeedBroadcast() + ", sessionKeys=" + getSessionKeys() + ", sessionIds=" + getSessionIds() + ", messageText=" + getMessageText() + ")";
|
}
|
|
public Boolean getNeedBroadcast() {
|
return this.needBroadcast;
|
}
|
|
public List<Object> getSessionKeys() {
|
return this.sessionKeys;
|
}
|
|
public List<String> getSessionIds() {
|
return this.sessionIds;
|
}
|
|
public String getMessageText() {
|
return this.messageText;
|
}
|
|
public static MessageDO broadcastMessage(String text) {
|
return new MessageDO().setMessageText(text).setNeedBroadcast(true);
|
}
|
}
|