|
@@ -0,0 +1,34 @@
|
|
|
+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() {
|
|
|
+ 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();
|
|
|
+ }
|
|
|
+
|
|
|
+ public RTXThread(String userName, String msg) {
|
|
|
+ super();
|
|
|
+ this.userName = userName;
|
|
|
+ this.msg = msg;
|
|
|
+ }
|
|
|
+
|
|
|
+ public RTXThread() {
|
|
|
+ super();
|
|
|
+ }
|
|
|
+}
|