📄 guimsg.java.svn-base
字号:
public int sendParaMonitorMsg(long reccomputerid, long type, Object m_Object) {
this.setParaCompId(reccomputerid);
if (sendMsg(reccomputerid, CollectorDefine.PARA_MONITOR_JMS_TYPE, type,
m_Object) >
0) {
CollectorDefine.PARA_MONITOR_FLAG = true;
return 1;
}
return -1;
}
public int sendGetLoginUserMsg() {
if (sendMsg( -1, CollectorDefine.GET_LOGIN_USER, -1, null) > 0) {
return 1;
}
return -1;
}
public int sendQuitMsg() {
if (sendMsg( -1, CollectorDefine.QUIT_JMS_TYPE, -1, null) > 0) {
CollectorDefine.QUIT_FLAG = true;
CollectorDefine.GUI_QUIT_FLAG = true;
this.clearmsg();
this.resetAllFlag();
this.resetFlag1();
CollectorDefine.m_InitFinished = false;
return 1;
}
return -1;
}
/* public int sendAliveMsg() {
MonitorPara monitor = new MonitorPara();
monitor.setChTermId(CollectorDefine.m_ChannelTerminal);
monitor.setReTermId(CollectorDefine.m_ReportTerminal);
monitor.setDataTermId(CollectorDefine.m_DataTerminal);
monitor.setExTermId(CollectorDefine.m_ExplainTerminal);
if (sendMsg( -1, CollectorDefine.ALIVE_JMS_TYPE, -1, monitor) > 0) {
CollectorDefine.ALIVE_FLAG = true;
return 1;
}
return -1;
}
*/
public int sendWriteChReportMsg(ArrayList m_array) {
if (sendMsg( -1, CollectorDefine.WRITE_CHREPORT_JMS_TYPE, -1, m_array) > 0) {
CollectorDefine.WRITE_CHREPORT_FLAG = true;
CollectorDefine.m_SelectedChTerminal = m_array;
return 1;
}
return -1;
}
public int sendWriteReportMsg(ArrayList m_array) {
if (sendMsg( -1, CollectorDefine.WRITE_REPORT_JMS_TYPE, -1, m_array) > 0) {
CollectorDefine.WRITE_REPORT_FLAG = true;
CollectorDefine.m_SelectedReTerminal = m_array;
return 1;
}
return -1;
}
public int sendWriteExplainMsg(ArrayList m_array) {
if (sendMsg( -1, CollectorDefine.WRITE_EXPLAIN_JMS_TYPE, -1, m_array) > 0) {
CollectorDefine.WRITE_EXPLAIN_FLAG = true;
CollectorDefine.m_SelectedExTerminal = m_array;
return 1;
}
return -1;
}
public int sendTaskAssignCancelMsg() {
if (sendMsg( -1, CollectorDefine.TASK_ASSIGN_JMS_TYPE_CANCEL, -1, null) > 0) {
CollectorDefine.TASK_ASSIGN_FLAG = false;
return 1;
}
return -1;
}
public int sendTaskAssignWarnCancelMsg(long reccomputerid) {
if (sendMsg(reccomputerid, CollectorDefine.TASK_ASSIGN_WARN_JMS_TYPE_CANCEL,
-1, null) > 0) {
CollectorDefine.TASK_ASSIGN_WARN_FLAG = false;
return 1;
}
return -1;
}
public int sendUpHintCancelMsg(long reccomputerid) { //上传信息取消
if (sendMsg(reccomputerid, CollectorDefine.UP_HINT_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.UP_HINT_FLAG = false;
return 1;
}
return -1;
}
public int sendWarnHintCancelMsg(long reccomputerid) { //告警信息取消
if (sendMsg(reccomputerid, CollectorDefine.WARN_HINT_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.WARN_HINT_FLAG = false;
return 1;
}
return -1;
}
public int sendReportMonitorCancelMsg() {
if (sendMsg( -1, CollectorDefine.REPORT_MONITOR_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.REPORT_MONITOR_FLAG = false;
CollectorDefine.m_ReportTerminal = -1;
return 1;
}
return -1;
}
public int sendExplainMonitorCancelMsg() {
if (sendMsg( -1, CollectorDefine.EXPLAIN_MONITOR_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.EXPLAIN_MONITOR_FLAG = false;
CollectorDefine.m_ExplainTerminal = -1;
return 1;
}
return -1;
}
public int sendChReportMonitorCancelMsg() {
if (sendMsg( -1, CollectorDefine.CHAN_REPORT_MONITOR_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.CHAN_REPORT_MONITOR_FLAG = false;
CollectorDefine.m_ReportTerminal = -1;
return 1;
}
return -1;
}
public int sendDataMonitorCancelMsg() {
if (sendMsg( -1, CollectorDefine.DATA_MONITOR_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.DATA_MONITOR_FLAG = false;
CollectorDefine.m_DataTerminal = -1;
return 1;
}
return -1;
}
public int sendTiTleMonitorCancelMsg(long reccomputerid) {
if (sendMsg(reccomputerid, CollectorDefine.TITLE_MONITOR_JMS_TYPE_CANCEL,
-1, null) > 0) {
CollectorDefine.TITLE_MONITOR_FLAG = false;
return 1;
}
return -1;
}
public int sendIIopJmsCancelMsg(long reccomputerid) {
if (sendMsg(reccomputerid, CollectorDefine.IIOP_JMS_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.IIOP_JMS_FLAG = false;
return 1;
}
return -1;
}
public int sendWriteChReportCancelMsg() {
if (sendMsg( -1, CollectorDefine.WRITE_CHREPORT_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.WRITE_CHREPORT_FLAG = false;
CollectorDefine.m_SelectedChTerminal = null;
return 1;
}
return -1;
}
public int sendWriteReportCancelMsg() {
if (sendMsg( -1, CollectorDefine.WRITE_REPORT_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.WRITE_REPORT_FLAG = false;
CollectorDefine.m_SelectedReTerminal = null;
return 1;
}
return -1;
}
public int sendWriteExplainCancelMsg() {
if (sendMsg( -1, CollectorDefine.WRITE_EXPLAIN_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.WRITE_EXPLAIN_FLAG = false;
CollectorDefine.m_SelectedExTerminal = null;
return 1;
}
return -1;
}
public int sendPortMonitorCancelMsg() {
if (sendMsg( -1, CollectorDefine.PORT_MONITOR_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.PORT_MONITOR_FLAG = false;
return 1;
}
return -1;
}
public int sendChannelTaskMsg() {
if (sendMsg( -1, CollectorDefine.CHANNEL_TASK_ASSIGN_JMS_TYPE, -1, null) >
0) {
CollectorDefine.CHANNEL_TASK_ASSIGN_FLAG = true;
return 1;
}
return -1;
}
public int sendChannelTaskCancelMsg() {
if (sendMsg( -1, CollectorDefine.CHANNEL_TASK_ASSIGN_JMS_TYPE_CANCEL, -1, null) >
0) {
CollectorDefine.CHANNEL_TASK_ASSIGN_FLAG = false;
return 1;
}
return -1;
}
//数据普通追补
public int sendPursueMsg(terminal m_terminal) {
if (m_terminal == null) {
return -1;
}
System.out.println("************************************");
System.out.println("terminal : " + m_terminal.getTerminalName());
System.out.println("************************************");
if (sendMsg( -1, CollectorDefine.DATA_PURSUE_JMS_TYPE, -1, m_terminal) > 0) {
CollectorDefine.DATA_PURSUE_FLAG = true;
return 1;
}
return -1;
}
//数据普通追补
public int sendPursueMsg(ArrayList DeviceArray) {
if (DeviceArray == null || DeviceArray.size() <= 0) {
return -1;
}
if (DeviceArray.get(0)instanceof terminal) {
System.out.println("************************************");
System.out.println("追补计量单元个数:" + DeviceArray.size());
Object[] terminals = DeviceArray.toArray();
for (int i = 0; i < terminals.length; i++) {
terminal m_terminal = (terminal) (terminals[i]);
System.out.println("terminal : " + m_terminal.getTerminalName());
}
System.out.println("************************************");
}
if (sendMsg( -1, CollectorDefine.DATA_PURSUE_JMS_TYPE, -1, DeviceArray) > 0) {
CollectorDefine.DATA_PURSUE_FLAG = true;
return 1;
}
return -1;
}
public int sendAutoPursueMsg(terminal m_terminal) {
if (m_terminal == null) {
return -1;
}
System.out.println("************************************");
System.out.println("terminal : " + m_terminal.getTerminalName());
System.out.println("************************************");
if (sendMsg( -1, CollectorDefine.AUTO_DATA_PURSUE_JMS_TYPE, -1, m_terminal) >
0) {
CollectorDefine.AUTO_DATA_PURSUE_FLAG = true;
return 1;
}
return -1;
}
public int sendAutoPursueMsg(ArrayList DeviceArray) {
if (DeviceArray == null || DeviceArray.size() <= 0) {
return -1;
}
if (DeviceArray.get(0)instanceof terminal) {
System.out.println("************************************");
System.out.println("追补计量单元个数:" + DeviceArray.size());
Object[] terminals = DeviceArray.toArray();
for (int i = 0; i < terminals.length; i++) {
terminal m_terminal = (terminal) (terminals[i]);
System.out.println("terminal : " + m_terminal.getTerminalName());
}
System.out.println("************************************");
}
if (sendMsg( -1, CollectorDefine.AUTO_DATA_PURSUE_JMS_TYPE, -1, DeviceArray) >
0) {
CollectorDefine.AUTO_DATA_PURSUE_FLAG = true;
return 1;
}
return -1;
}
public int sendKillMsg(long report_id) {
if (sendMsg( -1, CollectorDefine.KILL_THREAD, -1, new Long(report_id)) >
0) {
return 1;
}
return -1;
}
private int sendMsg(long rec_computer, int reporttype, long terminalid,
Object object) {
JmsObject m_jmsobject = new JmsObject();
m_jmsobject.setJmsReportType(reporttype);
if (rec_computer > 0) {
m_jmsobject.setRecComputerId(rec_computer);
}
else {
m_jmsobject.setRecComputerId(CollectorDefine.ALL_COMPUTER_REC);
}
m_jmsobject.setSendComputerId(CollectorDefine.GUI_COMPUTER);
m_jmsobject.setObject(object);
m_jmsobject.setTerminalId(terminalid);
//20060803 pzy modi
m_jmsobject.setUserName(CollectorDefine.username);
//20060803 pzy modi
if (writeObject(m_jmsobject) > 0) {
return 1;
}
// m_jmsobject = null;
return -1;
}
private int clearmsg() {
CollectorDefine.titalmsgArray.clear();
CollectorDefine.reportmsgArray.clear();
CollectorDefine.explainmsgArray.clear();
CollectorDefine.upmsgArray.clear();
CollectorDefine.taskwarnmsgArray.clear();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -