package com.qianwen.core.websocket.config; import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(WebSocketProperties.PREFIX) public class WebSocketProperties { public static final String PREFIX = "blade.websocket"; private String path = "/ws/info"; private String sockJsPath = "/ws_socketJs/info"; private String allowOrigins = "*"; private boolean supportPartialMessages = false; private boolean heartbeat = true; private boolean mapSession = true; private String messageDistributor = MessageDistributorTypeConstants.LOCAL; public void setPath(final String path) { this.path = path; } public void setSockJsPath(final String sockJsPath) { this.sockJsPath = sockJsPath; } public void setAllowOrigins(final String allowOrigins) { this.allowOrigins = allowOrigins; } public void setSupportPartialMessages(final boolean supportPartialMessages) { this.supportPartialMessages = supportPartialMessages; } public void setHeartbeat(final boolean heartbeat) { this.heartbeat = heartbeat; } public void setMapSession(final boolean mapSession) { this.mapSession = mapSession; } public void setMessageDistributor(final String messageDistributor) { this.messageDistributor = messageDistributor; } public boolean equals(final Object o) { if (o == this) { return true; } if (o instanceof WebSocketProperties) { WebSocketProperties other = (WebSocketProperties) o; if (other.canEqual(this) && isSupportPartialMessages() == other.isSupportPartialMessages() && isHeartbeat() == other.isHeartbeat() && isMapSession() == other.isMapSession()) { Object this$path = getPath(); Object other$path = other.getPath(); if (this$path == null) { if (other$path != null) { return false; } } else if (!this$path.equals(other$path)) { return false; } Object this$sockJsPath = getSockJsPath(); Object other$sockJsPath = other.getSockJsPath(); if (this$sockJsPath == null) { if (other$sockJsPath != null) { return false; } } else if (!this$sockJsPath.equals(other$sockJsPath)) { return false; } Object this$allowOrigins = getAllowOrigins(); Object other$allowOrigins = other.getAllowOrigins(); if (this$allowOrigins == null) { if (other$allowOrigins != null) { return false; } } else if (!this$allowOrigins.equals(other$allowOrigins)) { return false; } Object this$messageDistributor = getMessageDistributor(); Object other$messageDistributor = other.getMessageDistributor(); return this$messageDistributor == null ? other$messageDistributor == null : this$messageDistributor.equals(other$messageDistributor); } return false; } return false; } protected boolean canEqual(final Object other) { return other instanceof WebSocketProperties; } public int hashCode() { int result = (1 * 59) + (isSupportPartialMessages() ? 79 : 97); int result2 = (((result * 59) + (isHeartbeat() ? 79 : 97)) * 59) + (isMapSession() ? 79 : 97); Object $path = getPath(); int result3 = (result2 * 59) + ($path == null ? 43 : $path.hashCode()); Object $sockJsPath = getSockJsPath(); int result4 = (result3 * 59) + ($sockJsPath == null ? 43 : $sockJsPath.hashCode()); Object $allowOrigins = getAllowOrigins(); int result5 = (result4 * 59) + ($allowOrigins == null ? 43 : $allowOrigins.hashCode()); Object $messageDistributor = getMessageDistributor(); return (result5 * 59) + ($messageDistributor == null ? 43 : $messageDistributor.hashCode()); } public String toString() { return "WebSocketProperties(path=" + getPath() + ", sockJsPath=" + getSockJsPath() + ", allowOrigins=" + getAllowOrigins() + ", supportPartialMessages=" + isSupportPartialMessages() + ", heartbeat=" + isHeartbeat() + ", mapSession=" + isMapSession() + ", messageDistributor=" + getMessageDistributor() + ")"; } public String getPath() { return this.path; } public String getSockJsPath() { return this.sockJsPath; } public String getAllowOrigins() { return this.allowOrigins; } public boolean isSupportPartialMessages() { return this.supportPartialMessages; } public boolean isHeartbeat() { return this.heartbeat; } public boolean isMapSession() { return this.mapSession; } public String getMessageDistributor() { return this.messageDistributor; } }