📄 guimsg.java~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) {
m_jmsobject = null;
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();
CollectorDefine.warnmsgArray.clear();
CollectorDefine.statusmsgArray.clear();
CollectorDefine.parammsgArray.clear();
return 1;
}
private int sendmsgarray() {
int count = 0;
count = CollectorDefine.titalmsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 titalmsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.titalmsgArray.remove(0));
}
count = CollectorDefine.reportmsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 reportmsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.reportmsgArray.remove(0));
}
count = CollectorDefine.explainmsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 explainmsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.explainmsgArray.remove(0));
}
count = CollectorDefine.upmsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 upmsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.upmsgArray.remove(0));
}
count = CollectorDefine.taskwarnmsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 taskwarnmsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.taskwarnmsgArray.remove(0));
}
count = CollectorDefine.warnmsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 warnmsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.warnmsgArray.remove(0));
}
count = CollectorDefine.statusmsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 statusmsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.statusmsgArray.remove(0));
}
count = CollectorDefine.parammsgArray.size();
for (int i = 0; i < count; i++) {
System.out.println(" 发送 parammsgArray 到界面!");
writeObject( (JmsObject) CollectorDefine.parammsgArray.remove(0));
}
return 1;
}
private int resetFlag1() {
CollectorDefine.m_ReportTerminal = -1;
CollectorDefine.m_ExplainTerminal = -1;
CollectorDefine.m_ChannelTerminal = -1;
CollectorDefine.m_DataTerminal = -1;
return 1;
}
private int recMsgFromGui() {
int num = 0;
num = this.m_jmsgui.getJmsFront().getCollectorQueueNum();
if (num > 0) {
int i = 0;
JmsObject m_JmsObject = null;
int m_JmsReportType = 0;
for (i = 0; i < num; i++) {
m_JmsObject = (JmsObject)this.m_jmsgui.getJmsFront().getCollectorQueue();
if (m_JmsObject == null) {
continue;
}
recMsgProcess(m_JmsObject);
m_JmsObject = null;
}
}
// wj add
getNotifyProcess_2();
//
return 1;
}
public int getNotifyProcess_2() {
int num = 0;
ParamModify m_param_modify = null;
try {
//System.out.println( " ready rec jmsfront2 ");
if (this.m_jmsswitch.getJmsFront() != null) {
num = this.m_jmsswitch.getJmsFront().getNotifyQueueNum();
int func_no = 0;
long table_no = 0;
int j = 0;
int flag = -1;
// ArrayList m_arraylist = null;
if (num > 0) {
//System.out.println ("Get a message from AppServer ( jms front )...");
int i = 0;
for (i = 0; i < num; i++) {
m_param_modify = (ParamModify)this.m_jmsswitch.getJmsFront().
getNotifyQueue();
if (m_param_modify == null) {
continue;
}
func_no = m_param_modify.m_func_no;
table_no = m_param_modify.m_table_no;
// m_arraylist = new ArrayList();
CFunction.writeLog("guirec"," get a message from appserver1 ,id :" +
m_param_modify.toString(), null);
for (int k = 0; k < m_param_modify.m_ids.length; k++) {
//System.out.println ("id=====" + (new Long (m_param_modify.m_ids[i])).toString ());
/* flag = -1;
for (j = 0; j < m_arraylist.size(); j++) {
if (m_param_modify.m_ids[k] ==
( (Long) m_arraylist.get(j)).longValue()) {
flag = 1;
break;
}
}
if (flag == 1) {
continue;
}
*/
if ( ( (ArrayList) m_param_modify.vos).size() < k) {
CFunction.writeLog("guirec",
" getNotifyProcess In AutoCollector Error #1", null);
continue;
}
// m_arraylist.add(new Long(m_param_modify.m_ids[k]));
CFunction.writeLog("guirec"," get a message from appserver1---1 ,k :" +
k +
"func_no:" + func_no +
"table_no:" + table_no +
"m_param_modify.m_ids[k]:" +
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -