org.zodiac.sentinel.base.config.web.SentinelHttpInfo Maven / Gradle / Ivy
package org.zodiac.sentinel.base.config.web;
import java.util.Objects;
import org.zodiac.sentinel.base.config.SentinelFilterInfo;
public class SentinelHttpInfo {
private boolean httpMethodSpecify = false;
private boolean webContextUnify = true;
private final SentinelFilterInfo filter = new SentinelFilterInfo();
public SentinelHttpInfo() {
}
public boolean isHttpMethodSpecify() {
return httpMethodSpecify;
}
public void setHttpMethodSpecify(boolean httpMethodSpecify) {
this.httpMethodSpecify = httpMethodSpecify;
}
public boolean isWebContextUnify() {
return webContextUnify;
}
public void setWebContextUnify(boolean webContextUnify) {
this.webContextUnify = webContextUnify;
}
public SentinelFilterInfo getFilter() {
return filter;
}
@Override
public int hashCode() {
return Objects.hash(filter, httpMethodSpecify, webContextUnify);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SentinelHttpInfo other = (SentinelHttpInfo)obj;
return Objects.equals(filter, other.filter) && httpMethodSpecify == other.httpMethodSpecify
&& webContextUnify == other.webContextUnify;
}
@Override
public String toString() {
return "SentinelHttpInfo [httpMethodSpecify=" + httpMethodSpecify + ", webContextUnify=" + webContextUnify
+ ", filter=" + filter + "]";
}
}