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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? agateway.java

?? 發送短信 接收短信 多種接口com/net/modem 開發庫
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// SMSLib for Java v3
// A Java API library for sending and receiving SMS via a GSM modem
// or other supported gateways.
// Web Site: http://www.smslib.org
//
// Copyright (C) 2002-2009, Thanasis Delenikas, Athens/GREECE.
// SMSLib is distributed under the terms of the Apache License version 2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package org.smslib;

import java.io.IOException;
import java.util.Collection;
import java.util.concurrent.TimeUnit;
import org.smslib.InboundMessage.MessageClasses;
import org.smslib.OutboundMessage.FailureCauses;
import org.smslib.OutboundMessage.MessageStatuses;
import org.smslib.StatusReportMessage.DeliveryStatuses;
import org.smslib.scheduler.ASchedulerTask;

/**
 * Abstract class representing a Gateway, i.e. an interface capable of sending
 * and/or receiving SMS messages.
 */
public abstract class AGateway
{
	/**
	 * Enumeration representing the operation protocols of a GSM modem.
	 */
	public enum Protocols
	{
		/**
		 * PDU protocol.
		 */
		PDU,
		/**
		 * TEXT protocol. <b>Warning</b>: the TEXT protocol is not yet fully
		 * supported.
		 */
		TEXT
	}

	public enum GatewayStatuses
	{
		STOPPED, STOPPING, STARTING, STARTED, FAILURE, RESTART
	}

	public enum AsyncEvents
	{
		DELETE, NOTHING, INBOUNDMESSAGE, INBOUNDSTATUSREPORTMESSAGE, INBOUNDCALL
	}

	public static class GatewayAttributes
	{
		public static final int SEND = 0x0001;

		public static final int RECEIVE = 0x0002;

		public static final int CUSTOMFROM = 0x0004;

		public static final int BIGMESSAGES = 0x0008;

		public static final int WAPSI = 0x0010;

		public static final int PORTADDRESSING = 0x0020;

		public static final int FLASHSMS = 0x0040;

		public static final int DELIVERYREPORTS = 0x0080;
	}

	private String gatewayId;

	private int attributes;

	private boolean inbound;

	private boolean outbound;

	private Service srv;

	private Protocols protocol;

	private Statistics statistics;

	private String from;

	private int deliveryErrorCode;

	private GatewayStatuses status;

	private int restartCount;

	private QueueManager queueManager;

	public AGateway(String id)
	{
		this.gatewayId = id;
		this.srv = null;
		this.inbound = false;
		this.outbound = false;
		this.attributes = 0;
		this.protocol = Protocols.PDU;
		this.from = "";
		this.statistics = new Statistics();
		this.from = "";
		this.deliveryErrorCode = -1;
		this.status = GatewayStatuses.STOPPED;
		this.restartCount = 0;
	}

	public void setAttributes(int myAttributes)
	{
		this.attributes = myAttributes;
	}

	public int getAttributes()
	{
		return this.attributes;
	}

	public Service getService()
	{
		return this.srv;
	}

	public void setService(Service mySrv)
	{
		this.srv = mySrv;
	}

	/**
	 * Returns true if the the gateway is set for inbound messaging.
	 * 
	 * @return True if this gateway is set for inbound messaging.
	 */
	public boolean isInbound()
	{
		return this.inbound;
	}

	/**
	 * Enables or disables the gateway for inbound messaging. The command is
	 * accepted only if the gateway supports inbound messaging.
	 * 
	 * @param value
	 *            True to enable the gateway for inbound messaging.
	 */
	public void setInbound(boolean value)
	{
		if ((this.attributes & GatewayAttributes.RECEIVE) != 0) this.inbound = value;
	}

	/**
	 * Returns true if the the gateway is set for outbound messaging.
	 * 
	 * @return True if this gateway is set for outbound messaging.
	 */
	public boolean isOutbound()
	{
		return this.outbound;
	}

	/**
	 * Enables or disables the gateway for outbound messaging. The command is
	 * accepted only if the gateway supports outbound messaging.
	 * 
	 * @param value
	 *            True to enable the gateway for outbound messaging.
	 */
	public void setOutbound(boolean value)
	{
		if ((this.attributes & GatewayAttributes.SEND) != 0) this.outbound = value;
	}

	/**
	 * Sets the communication protocol of the gateway. The call is applicable
	 * only for modem gateways, in other cases it is ignored.
	 * 
	 * @param myProtocoll
	 *            The protocol to be used.
	 * @see Protocols
	 * @see #getProtocol
	 */
	public void setProtocol(Protocols myProtocoll)
	{
		this.protocol = myProtocoll;
	}

	/**
	 * Returns the communication protocol current in use by the gateway.
	 * 
	 * @return The communication protocol.
	 * @see Protocols
	 * @see #setProtocol(Protocols)
	 */
	public Protocols getProtocol()
	{
		return this.protocol;
	}

	/**
	 * Returns the gateway id assigned to this gateway during initialization.
	 * 
	 * @return The gateway id.
	 */
	public String getGatewayId()
	{
		return this.gatewayId;
	}

	/**
	 * Returns the gateway status.
	 * 
	 * @return The gateway status
	 * @see GatewayStatuses
	 */
	public GatewayStatuses getStatus()
	{
		return this.status;
	}

	/**
	 * Sets the gateway status to a new value.
	 * 
	 * @param myStatus
	 *            The new gateway status.
	 * @see GatewayStatuses
	 */
	public void setStatus(GatewayStatuses myStatus)
	{
		if (getService().getGatewayStatusNotification() != null) getService().getGatewayStatusNotification().process(getGatewayId(), getStatus(), myStatus);
		this.status = myStatus;
	}

	/**
	 * Returns the total number of messages received by this gateway.
	 * 
	 * @return The number of received messages.
	 */
	public int getInboundMessageCount()
	{
		return this.statistics.inbound;
	}

	public void incInboundMessageCount()
	{
		this.statistics.inbound++;
	}

	/**
	 * Returns the total number of messages sent via this gateway.
	 * 
	 * @return The number of sent messages.
	 */
	public int getOutboundMessageCount()
	{
		return this.statistics.outbound;
	}

	public void incOutboundMessageCount()
	{
		this.statistics.outbound++;
	}

	/**
	 * Returns the string that will appear on recipient's phone as the
	 * originator. Not all gateways support this.
	 * 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人ar影院免费观看视频| 美女网站视频久久| 欧美大肚乱孕交hd孕妇| 成人黄色小视频| 欧美日韩电影在线| 99久久综合精品| 成人国产精品免费观看| 6080yy午夜一二三区久久| 日本道精品一区二区三区| voyeur盗摄精品| 欧美一区二区三区在线看| 日韩一区二区免费在线电影| 日韩美女在线视频| 一区二区成人在线视频| 亚洲人一二三区| 日韩美女精品在线| 国产精品亚洲а∨天堂免在线| 国产精品一区专区| 日韩一区二区三区免费观看| 亚洲另类在线一区| 免费成人av在线| 成人性视频免费网站| 99久久精品国产网站| 欧美日韩大陆一区二区| 亚洲天堂a在线| 一本高清dvd不卡在线观看| 一本高清dvd不卡在线观看| 国产欧美精品一区aⅴ影院| 亚洲精品v日韩精品| 99视频国产精品| 综合久久给合久久狠狠狠97色| 国产成人精品在线看| 欧美日韩激情一区二区| 一区二区三区国产精品| 在线一区二区观看| 亚洲激情五月婷婷| 欧美在线|欧美| 亚洲精品一区二区三区在线观看| 久久久国产综合精品女国产盗摄| 欧美国产精品一区| 亚洲va欧美va人人爽| 久久国产生活片100| 99精品久久只有精品| 中文字幕一区免费在线观看| 天堂影院一区二区| 成人午夜激情视频| 亚洲色欲色欲www| 在线观看日韩电影| 亚洲va韩国va欧美va精品| 欧美一级二级三级蜜桃| 国模一区二区三区白浆| 日本韩国精品一区二区在线观看| 亚洲精品视频一区| 8v天堂国产在线一区二区| 免费精品视频最新在线| 久久精品在线免费观看| 日韩精品成人一区二区三区| 91精品国产aⅴ一区二区| 极品销魂美女一区二区三区| 欧美色综合网站| 国产精品理论片| 国产精品一区二区在线播放| 国产精品久线观看视频| 91国产视频在线观看| 日韩电影在线免费| 欧美日韩一区 二区 三区 久久精品 | 国产在线麻豆精品观看| 久久久.com| 欧美丝袜丝交足nylons| 韩国成人在线视频| 亚洲欧美另类图片小说| 国产成人在线电影| 一级精品视频在线观看宜春院| 欧美日韩成人综合| 成人蜜臀av电影| 日韩av电影天堂| 亚洲三级电影网站| 精品国产髙清在线看国产毛片| 波多野结衣亚洲| 久久精品国产亚洲高清剧情介绍 | 亚洲电影一区二区三区| 99久久精品国产一区二区三区| 五月婷婷激情综合| 91精品国产综合久久福利软件| 国产精品综合视频| 日韩黄色免费网站| 亚洲日韩欧美一区二区在线| 欧美成人国产一区二区| 毛片av一区二区三区| 日韩毛片精品高清免费| 亚洲精品一区二区三区蜜桃下载| 欧洲亚洲国产日韩| 成人av影视在线观看| 九九在线精品视频| 五月激情综合婷婷| 亚洲男人天堂一区| 国产精品理论片在线观看| 欧美精品一区二区蜜臀亚洲| 精品视频1区2区| 91麻豆国产精品久久| 亚洲尤物在线视频观看| 久久久精品国产99久久精品芒果| 欧美日韩成人激情| 91成人看片片| 色一情一伦一子一伦一区| 国产另类ts人妖一区二区| 蜜桃久久精品一区二区| 午夜激情综合网| 亚洲成人自拍一区| 一区二区三区美女视频| 亚洲精品视频一区二区| 亚洲免费av网站| 亚洲激情六月丁香| 一区二区激情视频| 一区二区免费看| 亚洲国产精品视频| 亚洲va韩国va欧美va| 亚洲成人一区二区在线观看| 亚洲香肠在线观看| 天天av天天翘天天综合网色鬼国产 | 91美女在线视频| 色久优优欧美色久优优| 欧美色图免费看| 制服.丝袜.亚洲.中文.综合| 欧美精品视频www在线观看| 久久国产视频网| 国产精品亚洲成人| gogogo免费视频观看亚洲一| 色美美综合视频| 在线免费观看视频一区| 欧美日韩电影在线播放| 精品国产人成亚洲区| 欧美精彩视频一区二区三区| 亚洲三级在线播放| 亚洲.国产.中文慕字在线| 免费观看在线色综合| 国产成人夜色高潮福利影视| 99在线热播精品免费| 欧美日韩免费观看一区三区| 日韩欧美国产综合一区| 依依成人综合视频| 日本系列欧美系列| 国产成人av资源| 欧美吻胸吃奶大尺度电影 | 成人夜色视频网站在线观看| 91在线视频播放| 欧美亚洲一区二区在线| 国产91富婆露脸刺激对白| 日韩高清不卡一区| 久久不见久久见免费视频7| 国产在线不卡视频| 五月开心婷婷久久| 成人综合婷婷国产精品久久蜜臀 | 成人高清伦理免费影院在线观看| 成人免费va视频| 欧美日韩在线播放一区| 精品国产a毛片| 国产精品短视频| 亚洲精品国产高清久久伦理二区| 亚洲成人av福利| 国内精品写真在线观看| 久久99精品网久久| 色综合天天视频在线观看 | 美洲天堂一区二卡三卡四卡视频| 日韩极品在线观看| 欧美在线制服丝袜| 国产日韩精品一区二区三区在线| 毛片基地黄久久久久久天堂| 欧美一区二区三区婷婷月色| 中文字幕免费不卡| 国产精品免费丝袜| 亚洲男人的天堂在线aⅴ视频| 国产精品无遮挡| 婷婷久久综合九色综合绿巨人| 老鸭窝一区二区久久精品| 99re视频精品| 国产精品久久久久影院亚瑟 | xnxx国产精品| 免费国产亚洲视频| 国产喂奶挤奶一区二区三区| 成人欧美一区二区三区白人 | fc2成人免费人成在线观看播放| 欧美挠脚心视频网站| 中文字幕在线不卡国产视频| 亚洲成人av资源| 国产一区二区三区免费观看| 日本电影欧美片| 一区视频在线播放| 美女爽到高潮91| 欧美人狂配大交3d怪物一区| 国产精品电影院| 精品一区二区三区在线播放视频 | 色婷婷精品久久二区二区蜜臂av | 国产精品理伦片| 国产91在线观看丝袜| 日韩视频免费直播| 久久一区二区视频| 97se狠狠狠综合亚洲狠狠| 亚洲日本va午夜在线电影| 亚洲三级理论片|