📄 fidspush.java
字号:
/**
* Created at Dec 4, 2008
*/
package com.jdev.app.db;
import com.jdev.net.connector.ConnectionFactory;
import com.jdev.net.event.Notifier;
/**
* <p>Title: FidsPush</p>
* <p>Description: </p>
* @author Lawrence
* @version
*/
public class FidsPush implements Runnable {
private static Notifier notifier = Notifier.getNotifier();
private FidsQueueHelper fidsDataHelper;
/**
*
*/
public FidsPush() {
fidsDataHelper = new FidsQueueHelper(ConnectionFactory.CLIENT);
}
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
public void run() {
while (!Thread.interrupted()) {
try {
Thread.sleep(1000);
String strOut = fidsDataHelper.readSend();
// Debug.logVerbose(strOut);
// 发送短信
String[] s = strOut.split(",");
if(s.length == 3){
String[] callees = new String[]{s[0]};
String isReturn = "0";
int msgId = 136744;
strOut = s[1];
// String ret = SMSWebService.sendMsg(strOut, callees, isReturn, msgId);
notifier.fireOnStatus(strOut, Integer.parseInt("0"));
// if(ret.equalsIgnoreCase("0"))
// notifier.fireOnStatus(strOut, 0);
// else
// notifier.fireOnStatus(strOut, 1);
}
} catch (Exception e) {
notifier.fireOnError("-->Error occured in SmsPush: "
+ e.getMessage());
continue;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -