starter.java

来自「Logica lastest SMPP API」· Java 代码 · 共 50 行

JAVA
50
字号
package com.smpp.server;

import java.io.File;

import com.smpp.application.MyMTSender;

import noNamespace.SMPPServerDocument;
import noNamespace.SMPPServerType;
import noNamespace.SMSCType;


public class Starter
{
	static String propsFilePath = "SMPPServer.xml";

	public static void main(String[] args) throws Exception
	{
		File file = new File(propsFilePath);
		SMPPServerDocument doc = SMPPServerDocument.Factory.parse(file);
		SMPPServerType serverType = doc.getSMPPServer();
		SMSCType [] array = serverType.getSMSCArray();
		int size = array.length;
		
		 
		for (int i = 0; i < size; i++)
		{
			 
			SMPPSendReveive smppSender = new SMPPSendReveive(array[i]);
			//System.out.println("SMPP Sender is :" + smppSender);
			Thread th = new Thread(smppSender);
			th.start();
		}
		
		Thread.sleep(5000);
		/*
		System.out.println("About to start sending message");
		MyMTSender myMTS = new MyMTSender();
		for(int j = 0; j < 3 ; j++)
		{
			myMTS.send();
		}
		*/
		

	}

	 

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?