| 1234567891011121314151617181920212223242526272829303132333435363738 |
- package rtx;
- public class RTXThread extends Thread{
-
- private String userName;
- private String msg;
- private String type = "0";
- private String delayTime = "0";
- private int iRet = -1;
- @Override
- public void run() {
- try{
- RTXSvrApi RtxsvrapiObj = new RTXSvrApi();
- if (RtxsvrapiObj.Init()) {
- iRet = RtxsvrapiObj.sendNotify(userName, "", msg, type, delayTime);
- if (iRet == 0) {
- System.out.println("发送成功");
- } else {
- System.out.println("发送失败");
- }
- }
- RtxsvrapiObj.UnInit();
- } catch (Throwable e) {
- e.printStackTrace();
- }
- }
- public RTXThread(String userName, String msg) {
- super();
- this.userName = userName;
- this.msg = msg;
- }
- public RTXThread() {
- super();
- }
- }
|