UI改进
This commit is contained in:
@@ -0,0 +1,214 @@
|
||||
package org.kne.cloud.network.klalb;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.kne.cloud.network.MultipurposeSocketAddress;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
public class KLALBControllerConfigItem extends KLALBConfigItem {
|
||||
private String language;
|
||||
private boolean nogui;
|
||||
private String VirtualAddress;
|
||||
private Long VirtualASN;
|
||||
private List<InetAddress> DNS;
|
||||
private MultipurposeSocketAddress TCPListen;
|
||||
private MultipurposeSocketAddress UDPListen;
|
||||
private String VirtualSocketName;
|
||||
private List<MultipurposeSocketAddress>LineTable=new ArrayList<>();
|
||||
private List<MultipurposeSocketAddress>ConnectLineTable=new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
|
||||
public KLALBControllerConfigItem(String type, boolean nogui, String virtualAddress, Long virtualASN,
|
||||
List<InetAddress> dNS, MultipurposeSocketAddress tCPListen, MultipurposeSocketAddress uDPListen,
|
||||
String virtualSocketName, List<MultipurposeSocketAddress> lineTable,
|
||||
List<MultipurposeSocketAddress> connectLineTable) {
|
||||
super(type);
|
||||
this.nogui = nogui;
|
||||
VirtualAddress = virtualAddress;
|
||||
VirtualASN = virtualASN;
|
||||
DNS = dNS;
|
||||
TCPListen = tCPListen;
|
||||
UDPListen = uDPListen;
|
||||
VirtualSocketName = virtualSocketName;
|
||||
LineTable = lineTable;
|
||||
ConnectLineTable = connectLineTable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setLanguage(String language) {
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public KLALBControllerConfigItem(String type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getVirtualSocketName() {
|
||||
return VirtualSocketName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setVirtualSocketName(String virtualSocketName) {
|
||||
VirtualSocketName = virtualSocketName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean isNogui() {
|
||||
return nogui;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setNogui(boolean nogui) {
|
||||
this.nogui = nogui;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getVirtualAddress() {
|
||||
return VirtualAddress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setVirtualAddress(String virtualAddress) {
|
||||
VirtualAddress = virtualAddress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Long getVirtualASN() {
|
||||
return VirtualASN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setVirtualASN(Long virtualASN) {
|
||||
VirtualASN = virtualASN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<InetAddress> getDNS() {
|
||||
return DNS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setDNS(List<InetAddress> dNS) {
|
||||
DNS = dNS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public MultipurposeSocketAddress getTCPListen() {
|
||||
return TCPListen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setTCPListen(MultipurposeSocketAddress tCPListen) {
|
||||
TCPListen = tCPListen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public MultipurposeSocketAddress getUDPListen() {
|
||||
return UDPListen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setUDPListen(MultipurposeSocketAddress uDPListen) {
|
||||
UDPListen = uDPListen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<MultipurposeSocketAddress> getLineTable() {
|
||||
return LineTable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setLineTable(List<MultipurposeSocketAddress> lineTable) {
|
||||
LineTable = lineTable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<MultipurposeSocketAddress> getConnectLineTable() {
|
||||
return ConnectLineTable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setConnectLineTable(List<MultipurposeSocketAddress> connectLineTable) {
|
||||
ConnectLineTable = connectLineTable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "KLALBControllerConfigItem [language=" + language + ", nogui=" + nogui + ", VirtualAddress="
|
||||
+ VirtualAddress + ", VirtualASN=" + VirtualASN + ", DNS=" + DNS + ", TCPListen=" + TCPListen
|
||||
+ ", UDPListen=" + UDPListen + ", VirtualSocketName=" + VirtualSocketName + ", LineTable=" + LineTable
|
||||
+ ", ConnectLineTable=" + ConnectLineTable + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + Objects.hash(ConnectLineTable, DNS, LineTable, TCPListen, UDPListen, VirtualASN,
|
||||
VirtualAddress, VirtualSocketName, language, nogui);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (!super.equals(obj))
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
KLALBControllerConfigItem other = (KLALBControllerConfigItem) obj;
|
||||
return Objects.equals(ConnectLineTable, other.ConnectLineTable) && Objects.equals(DNS, other.DNS)
|
||||
&& Objects.equals(LineTable, other.LineTable) && Objects.equals(TCPListen, other.TCPListen)
|
||||
&& Objects.equals(UDPListen, other.UDPListen) && Objects.equals(VirtualASN, other.VirtualASN)
|
||||
&& Objects.equals(VirtualAddress, other.VirtualAddress)
|
||||
&& Objects.equals(VirtualSocketName, other.VirtualSocketName)
|
||||
&& Objects.equals(language, other.language) && nogui == other.nogui;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user