亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? asyncreceiver2.java

?? 短信短消息SMPP開發(fā)的JAVA API最新版本。
?? JAVA
字號(hào):
/* * Java SMPP API * Copyright (C) 1998 - 2002 by Oran Kelly *  * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. *  * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. *  * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *  * A copy of the LGPL can be viewed at http://www.gnu.org/copyleft/lesser.html * Java SMPP API author: orank@users.sf.net * Java SMPP API Homepage: http://smppapi.sourceforge.net/ * $Id: AsyncReceiver2.java,v 1.5 2004/10/09 22:02:43 orank Exp $ */package ie.omk.smpp.examples;import ie.omk.smpp.Connection;import ie.omk.smpp.event.ReceiverExitEvent;import ie.omk.smpp.event.SMPPEventAdapter;import ie.omk.smpp.message.BindResp;import ie.omk.smpp.message.DeliverSM;import ie.omk.smpp.message.Unbind;import ie.omk.smpp.message.UnbindResp;import java.io.IOException;import java.util.Date;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** Example SMPP receiver using asynchronous communications. * This example demonstrates asynchronous communications using * the SMPPEventAdapter. The SMPPEventAdapter is a utility class * which implements the ConnectionObserver interface for you * and delivers received events to appropriate methods in * the adapter implementation. *  * @see ie.omk.smpp.examples.ParseArgs ParseArgs for details on running * this class. */public class AsyncReceiver2 {    private Log logger = LogFactory.getLog(AsyncReceiver2.class);    // Object to block the main thread on.    private Object blocker = new Object();    // Our receiver connection    private Connection myConnection = null;    private java.util.HashMap myArgs = null;    // time example started at    private long start = 0;    // time example ended at    private long end = 0;    // Number of deliver_sm packets received    private int msgCount = 0;    public AsyncReceiver2()    {    }    // Print out a report    private void endReport()    {	logger.info("deliver_sm's received: " + msgCount);	logger.info("Start time: " + new Date(start).toString());	logger.info("End time: " + new Date(end).toString());	logger.info("Elapsed: " + (end - start) + " milliseconds.");    }    private void init(String[] args) {	try {	    myArgs = ParseArgs.parse(args);	    int port = Integer.parseInt((String)myArgs.get(ParseArgs.PORT));	    myConnection = new Connection((String)myArgs.get(ParseArgs.HOSTNAME), port, true);	} catch (Exception x) {	    logger.info("Bad command line arguments.");	}    }    private void run() {	try {	    // Create the observer	    AsyncExampleObserver observer = new AsyncExampleObserver();	    // set the receiver to automatically acknowledge deliver_sm and	    // enquire_link requests from the SMSC.	    myConnection.autoAckLink(true);	    myConnection.autoAckMessages(true);	    // add this example to the list of observers on the receiver	    // connection	    myConnection.addObserver(observer);	    // bind to the SMSC as a receiver	    logger.info("Binding to the SMSC..");	    BindResp resp = myConnection.bind(Connection.RECEIVER,		    (String)myArgs.get(ParseArgs.SYSTEM_ID),		    (String)myArgs.get(ParseArgs.PASSWORD),		    (String)myArgs.get(ParseArgs.SYSTEM_TYPE),		    Integer.parseInt((String)myArgs.get(ParseArgs.ADDRESS_TON)),		    Integer.parseInt((String)myArgs.get(ParseArgs.ADDRESS_NPI)),		    (String)myArgs.get(ParseArgs.ADDRESS_RANGE));	    // block until we're unbound from the SMSC..	    synchronized (blocker) {		blocker.wait();	    }	    // Close down the network connection.	    myConnection.closeLink();	} catch (Exception x) {	    logger.warn("Exception", x);	} finally {	    endReport();	}    }    private class AsyncExampleObserver extends SMPPEventAdapter {	public AsyncExampleObserver() {	}	// Handle message delivery. This method does not need to acknowledge the	// deliver_sm message as we set the Connection object to	// automatically acknowledge them.	public void deliverSM(Connection source, DeliverSM dm)	{	    int st = dm.getCommandStatus();	    if (st != 0) {		logger.info("DeliverSM: !Error! status = " + st);	    } else {		++msgCount;		logger.info("DeliverSM: \"" + dm.getMessageText()			+ "\"");	    }	}	// Called when a bind response packet is received.	public void bindResponse(Connection source, BindResp br)	{	    if (br.getCommandStatus() == 0)		logger.info("Successfully bound. Awaiting messages..");	    else {		logger.info("Bind did not succeed!");		try {		    myConnection.closeLink();		} catch (IOException x) {		    logger.info("IOException closing link:\n"			    + x.toString());		}		synchronized (blocker) {		    blocker.notify();		}	    }	}	// This method is called when the SMSC sends an unbind request to our	// receiver. We must acknowledge it and terminate gracefully..	public void unbind(Connection source, Unbind ubd)	{	    logger.info("SMSC requested unbind. Acknowledging..");	    try {		// SMSC requests unbind..		UnbindResp ubr = new UnbindResp(ubd);		myConnection.sendResponse(ubr);	    } catch (IOException x) {		logger.info("IOException while acking unbind.\n"			+ x.toString());	    }	}	// This method is called when the SMSC responds to an unbind request we sent	// to it..it signals that we can shut down the network connection and	// terminate our application..	public void unbindResponse(Connection source, UnbindResp ubr)	{	    int st = ubr.getCommandStatus();	    if (st != 0) {		logger.info("Unbind response: !Error! status = " + st);	    } else {		logger.info("Successfully unbound.");	    }	}	// this method is called when the receiver thread is exiting normally.	public void receiverExit(Connection source, ReceiverExitEvent ev)	{        if (ev.getReason() == ReceiverExitEvent.BIND_TIMEOUT) {            logger.info("Bind timed out waiting for response.");        }        	    logger.info("Receiver thread has exited.");	    synchronized (blocker) {		blocker.notify();	    }	}	// this method is called when the receiver thread exits due to an exception	// in the thread...	public void receiverExitException(Connection source,		ReceiverExitEvent ev)	{	    logger.info("Receiver thread exited abnormally. The following"		    + " exception was thrown:\n" + ev.getException().toString());	    synchronized (blocker) {		blocker.notify();	    }	}    }    public static void main(String[] clargs)    {	AsyncReceiver2 a2 = new AsyncReceiver2();	a2.init(clargs);	a2.run();	System.exit(0);    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品乱人伦中文| 五月天国产精品| 日韩欧美一级二级| 97精品国产露脸对白| 精品亚洲国内自在自线福利| 一区二区三区中文字幕精品精品| 精品国产乱码久久| 欧美精品电影在线播放| 99热精品国产| 国产精品一区免费视频| 日韩一区精品视频| 一区二区三区资源| 国产精品激情偷乱一区二区∴| 精品久久免费看| 欧美体内she精视频| 99久久精品情趣| 国产盗摄女厕一区二区三区| 免费成人在线影院| 五月激情综合网| 亚洲午夜精品网| 亚洲免费av在线| 日韩美女啊v在线免费观看| 久久这里都是精品| 精品美女被调教视频大全网站| 日韩一区二区在线免费观看| 欧美性生交片4| 色老汉一区二区三区| 97久久人人超碰| 91丨九色丨黑人外教| 成人一区二区三区中文字幕| 国产伦精品一区二区三区在线观看 | 一区二区三区四区不卡视频| 国产精品人成在线观看免费| 欧美综合久久久| 亚洲一区二区五区| 国产精品久久三区| 国产日韩欧美一区二区三区乱码| 欧美大尺度电影在线| 欧美区一区二区三区| 欧美三级电影网站| 欧美日本视频在线| 日韩一区二区三区免费看| 欧美一区二区三区在线观看| 91精品久久久久久久99蜜桃| 欧美一级免费大片| 日韩免费一区二区三区在线播放| 精品欧美乱码久久久久久| 26uuu精品一区二区三区四区在线| 精品久久久久久综合日本欧美| 日韩精品影音先锋| 久久久高清一区二区三区| 国产嫩草影院久久久久| 一区免费观看视频| 亚洲一二三级电影| 久久精品国产亚洲a| 国产成人免费网站| 91亚洲精品久久久蜜桃| 日韩色视频在线观看| 欧美色图在线观看| 7777精品伊人久久久大香线蕉最新版 | 亚洲欧美日韩国产综合在线| 亚洲永久精品大片| 麻豆精品在线看| 粉嫩一区二区三区在线看| 99热这里都是精品| 91麻豆精品国产自产在线| 精品剧情在线观看| 中文字幕一区二区三区乱码在线| 亚洲精品国产品国语在线app| 日本欧美一区二区| 丁香一区二区三区| 在线免费亚洲电影| 精品剧情v国产在线观看在线| 亚洲国产精品高清| 污片在线观看一区二区| 国产一级精品在线| 欧美性大战xxxxx久久久| 精品少妇一区二区三区视频免付费| 国产精品久久久久久久久免费相片| 一区二区高清免费观看影视大全| 美女视频黄免费的久久| 99国产精品久| 日韩精品综合一本久道在线视频| 日韩 欧美一区二区三区| 91老师片黄在线观看| 欧美久久久久久蜜桃| 国产欧美一区在线| 亚洲不卡一区二区三区| 国产成人av网站| 5566中文字幕一区二区电影| 中国色在线观看另类| 日韩专区一卡二卡| av亚洲精华国产精华| 日韩精品一区二区三区四区| 一级日本不卡的影视| 国产毛片精品视频| 欧美日韩国产片| 日韩毛片视频在线看| 久久99热狠狠色一区二区| 日本高清不卡一区| 国产女主播视频一区二区| 日韩国产欧美在线播放| 色天天综合色天天久久| 日本一区二区三区dvd视频在线| 日韩av电影免费观看高清完整版在线观看 | 欧美国产一区二区| 爽好多水快深点欧美视频| 91一区二区三区在线播放| 久久色.com| 美女在线视频一区| 在线亚洲免费视频| 亚洲丝袜制服诱惑| 丁香一区二区三区| 2020国产精品自拍| 蜜臀av性久久久久av蜜臀妖精| 欧美在线观看一区二区| 亚洲天堂a在线| 成人99免费视频| 欧美国产精品v| 国产成人在线看| 久久伊99综合婷婷久久伊| 久久电影国产免费久久电影| 欧美精品在线一区二区| 亚洲成av人片一区二区三区| 在线亚洲一区二区| 亚洲精品日韩综合观看成人91| 国产91精品入口| 国产精品网站一区| 粉嫩高潮美女一区二区三区| 国产亚洲欧美在线| 国产精品一区久久久久| 精品成a人在线观看| 美脚の诱脚舐め脚责91| 日韩欧美一卡二卡| 国内精品免费**视频| 欧美成人一区二区三区片免费 | 99在线精品观看| 中文字幕在线一区免费| 成人app在线观看| 国产精品成人免费精品自在线观看| 成人精品一区二区三区四区| 国产欧美一区二区精品婷婷| 国产成人在线网站| 国产精品国产三级国产三级人妇 | 欧美一级艳片视频免费观看| 青草av.久久免费一区| 欧美一级片在线观看| 喷白浆一区二区| 精品福利一区二区三区| 国产美女精品在线| 中文字幕色av一区二区三区| 91在线无精精品入口| 亚洲一区二区影院| 日韩一区二区三区视频在线| 国产一区二区三区蝌蚪| 国产精品私人自拍| 色综合久久中文综合久久牛| 一区二区三区在线免费视频| 欧美丰满少妇xxxxx高潮对白| 蜜桃视频在线一区| 国产三级精品视频| 一本大道综合伊人精品热热 | 欧美精品一区二区蜜臀亚洲| 国产精品一线二线三线精华| 亚洲美女免费在线| 欧美夫妻性生活| 国产激情视频一区二区在线观看 | 亚洲色图另类专区| 欧美视频一区二| 狠狠色狠狠色综合| 1024成人网| 日韩亚洲欧美在线观看| 成人激情开心网| 婷婷开心激情综合| 久久久91精品国产一区二区精品| 色一情一乱一乱一91av| 男男成人高潮片免费网站| 国产精品三级视频| 欧美日韩和欧美的一区二区| 国内外精品视频| 亚洲自拍偷拍av| 久久青草欧美一区二区三区| 日本电影亚洲天堂一区| 九色综合狠狠综合久久| 全国精品久久少妇| 精品乱码亚洲一区二区不卡| 91麻豆国产香蕉久久精品| 免费在线观看一区二区三区| 日韩毛片一二三区| 精品国精品国产尤物美女| 91捆绑美女网站| 精品亚洲aⅴ乱码一区二区三区| 一区二区三区在线视频免费观看| 精品国产乱码久久久久久老虎| 欧美性猛片xxxx免费看久爱 | 欧美电影在哪看比较好| 成人午夜激情在线| 久久99九九99精品| 日韩综合在线视频| 一区二区三区四区av|