package udptcp;
|
import java.util.List;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
import dell_system.MessageViewPanel;
|
public class HexBaowen {
|
String hex;
|
String ip;
|
String addtime;
|
int port;
|
int localPort; // Ìí¼Ó±¾µØ¶Ë¿Ú×Ö¶Î
|
String dataFrom;
|
static List<HexBaowen> allReceivedHexMessages = new CopyOnWriteArrayList<>();
|
public static void intsert(String ip, String hex, String time, int port, int localPort, int timestamp) {
|
HexBaowen baowen = new HexBaowen();
|
baowen.setHex(hex);
|
baowen.setIp(ip);
|
baowen.setAddtime(time);
|
baowen.setTimestamp(timestamp);
|
baowen.setPort(port);
|
baowen.setLocalPort(localPort); // ÉèÖñ¾µØ¶Ë¿Ú
|
allReceivedHexMessages.add(baowen);
|
if (MessageViewPanel.isWindowVisible) {
|
MessageViewPanel.captureData(hex, ip, port, localPort, time);
|
}
|
}
|
|
// Ìí¼Ó±¾µØ¶Ë¿ÚµÄgetterºÍsetter
|
public int getLocalPort() {
|
return localPort;
|
}
|
|
public void setLocalPort(int localPort) {
|
this.localPort = localPort;
|
}
|
|
|
public String getDataFrom() {
|
return dataFrom;
|
}
|
|
public void setDataFrom(String dataFrom) {
|
this.dataFrom = dataFrom;
|
}
|
|
public int getPort() {
|
return port;
|
}
|
|
public void setPort(int port) {
|
this.port = port;
|
}
|
|
int timestamp;
|
|
public String getHex() {
|
return hex;
|
}
|
|
public String getIp() {
|
return ip;
|
}
|
|
public String getAddtime() {
|
return addtime;
|
}
|
|
public int getTimestamp() {
|
return timestamp;
|
}
|
|
public void setHex(String hex) {
|
this.hex = hex;
|
}
|
|
public void setIp(String ip) {
|
this.ip = ip;
|
}
|
|
public void setAddtime(String addtime) {
|
this.addtime = addtime;
|
}
|
|
public void setTimestamp(int timestamp) {
|
this.timestamp = timestamp;
|
}
|
}
|