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

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

?? smpp.java

?? Java實現的點對點短消息發送協議(smpp)開發包源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// FrontEnd Plus for JAD
// DeCompiled : Smpp.class

package sms;

import java.io.*;
import java.net.Socket;
import java.net.UnknownHostException;
import utils.*;

// Referenced classes of package sms:
//            SMSException, smppEncoder, smppRequest, smDL, 
//            smDLModification, queryAll, smppDispatcher, param, 
//            smppHeader, Message, Binding, smppSyncResponse, 
//            smppCommands, Errors, Receiver, AddCustomerResponse, 
//            Customer, AddDLResponse, Address, AddMemberResponse, 
//            Member, CancelResponse, ListResponse, ParameterResponse, 
//            ModCustomerResponse, GetCustomerResponse, SendResponse, BindResponse, 
//            GetDLResponse, GetMemberResponse, DetailsResponse, ReplaceResponse, 
//            StatusResponse, DelCustomerResponse, DelDLResponse, DelMemberResponse

public class Smpp extends semaphore
    implements smppCommands, Errors
{

    public static boolean encryption;
    private String cr;
    Receiver receiverTarget;
    private boolean debugon;
    private int lastSequenceNumber;
    private OutputStream out;
    Socket socket;
    fifo pendingRequests;
    table pendingResponses;
    private static String smscHost;
    private static int smscPort;
    private int bindtype;
    smppDispatcher dispatcher;
    boolean disconnected;
    int disconnectedError;

    public void add(AddCustomerResponse addcustomerresponse, Customer customer)
        throws SMSException, IOException
    {
        if(customer == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        try
        {
            smppencoder.addCustomer(customer);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(17, customer, addcustomerresponse), smppencoder);
    }

    public void add(Customer customer)
        throws SMSException, IOException
    {
        add(null, customer);
        getSyncResponse();
    }

    public void add(AddDLResponse adddlresponse, Address address, String s)
        throws SMSException, IOException
    {
        if(address == null || s == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        smDL smdl = new smDL();
        smdl.source = address;
        smdl.name = s;
        try
        {
            smppencoder.addDL(smdl);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(22, smdl, adddlresponse), smppencoder);
    }

    public void add(Address address, String s)
        throws SMSException, IOException
    {
        add(null, address, s);
        getSyncResponse();
    }

    public void add(AddMemberResponse addmemberresponse, Address address, String s, Member member)
        throws SMSException, IOException
    {
        if(address == null || s == null || member == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        smDLModification smdlmodification = new smDLModification(address, s, member, false);
        try
        {
            smppencoder.modDL(smdlmodification);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(23, smdlmodification, addmemberresponse), smppencoder);
    }

    public void add(Address address, String s, Member member)
        throws SMSException, IOException
    {
        add(null, address, s, member);
        getSyncResponse();
    }

    private void log(String s)
    {
        if(debugon)
            System.out.println("" + Thread.currentThread() + "  SENDER " + s);
    }

    public void cancel(CancelResponse cancelresponse, Message message)
        throws SMSException, IOException
    {
        if(message == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        try
        {
            smppencoder.cancel(message);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(8, message, cancelresponse), smppencoder);
    }

    public void cancel(Message message)
        throws IOException, SMSException
    {
        cancel(null, message);
        getSyncResponse();
    }

    public Smpp(String s, int i)
        throws UnknownHostException, IOException, socksException
    {
        super("SMPP");
        cr = "$Id: SMS JDK (tm) Version 2.0.1 Copyright (C) 1998 Noctor Consulting Limited. $";
        smppInit(s, i);
    }

    public Smpp()
        throws UnknownHostException, IOException, socksException, SMSException
    {
        super("SMPP");
        cr = "$Id: SMS JDK (tm) Version 2.0.1 Copyright (C) 1998 Noctor Consulting Limited. $";
        if(smscHost == null || smscPort == 0)
        {
            throw new SMSException(10001);
        } else
        {
            smppInit(smscHost, smscPort);
            return;
        }
    }

    public void list(ListResponse listresponse, Address address, int i)
        throws SMSException, IOException
    {
        if(i <= 0)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        queryAll queryall = new queryAll();
        queryall.source = address;
        queryall.count = (byte)i;
        try
        {
            smppencoder.queryAll(queryall);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(35, address, listresponse), smppencoder);
    }

    private void putRequest(smppRequest smpprequest, smppEncoder smppencoder)
        throws SMSException, IOException
    {
        if(debugon)
            log("Sending packet... " + Thread.currentThread());
        if(smppencoder == null)
        {
            sendPacket(smpprequest, null);
        } else
        {
            if(debugon)
                log("INCLUDED BODY: " + smppencoder);
            sendPacket(smpprequest, smppencoder.getBytes());
        }
        if(debugon)
            log("sent packet");
        if(smpprequest.thread != null)
        {
            if(smpprequest.thread.equals(dispatcher.dispatcherThread))
            {
                if(debugon)
                    log("Sending from dispatcher thread");
                try
                {
                    dispatcher.smppDispatch(smpprequest.sequenceNumber);
                    return;
                }
                catch(decoderException decoderexception)
                {
                    throw new IOException("protocol error:" + decoderexception);
                }
                catch(encoderException encoderexception)
                {
                    throw new SMSException(encoderexception);
                }
            }
            if(debugon)
                log("Suspending until response is received");
            Thread thread = Thread.currentThread();
            try
            {
                while(pendingResponses.get(thread) == null) 
                    Thread.yield();
            }
            catch(InterruptedException _ex) { }
            if(debugon)
                log("Suspend over");
        }
    }

    public String[] list(Address address, int i)
        throws SMSException, IOException
    {
        list(null, address, i);
        String as[] = (String[])getSyncResponse();
        return as;
    }

    public void parameter(ParameterResponse parameterresponse, String s)
        throws SMSException, IOException
    {
        if(s == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        param param1 = new param();
        param1.name = s;
        try
        {
            smppencoder.paramGet(param1);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(34, param1, parameterresponse), smppencoder);
    }

    public String parameter(String s)
        throws SMSException, IOException
    {
        parameter(null, s);
        return (String)getSyncResponse();
    }

    public void mod(ModCustomerResponse modcustomerresponse, Customer customer)
        throws SMSException, IOException
    {
        if(customer == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        try
        {
            smppencoder.modifyCustomer(customer);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(19, customer, modcustomerresponse), smppencoder);
    }

    public void mod(Customer customer)
        throws SMSException, IOException
    {
        mod(null, customer);
        getSyncResponse();
    }

    public void checkLink()
        throws SMSException, IOException
    {
        putRequest(new smppRequest(21, null, null), null);
        getSyncResponse();
    }

    private synchronized void sendPacket(smppRequest smpprequest, byte abyte0[])
        throws SMSException, IOException
    {
        try
        {
            if(debugon)
                log(" *** USE");
            use();
            if(debugon)
                log(" *** USING");
            if(disconnected)
                throw new SMSException(disconnectedError);
            if(bindtype == 0)
                throw new SMSException(10002);
            if(smpprequest.command == 6)
            {
                bindtype = 0;
                disconnected = true;
                disconnectedError = 10009;
            }
            if(smpprequest.target == null)
                smpprequest.thread = Thread.currentThread();
            if(bindtype == 1 && smpprequest.command != 1 && smpprequest.command != 6 && smpprequest.command != 21)
                throw new SMSException(10003);
            smppHeader smppheader = new smppHeader();
            if((smpprequest.command & 0x80000000) == 0)
            {
                lastSequenceNumber++;
                smppheader.sequence = lastSequenceNumber;
            }
            smppheader.command = smpprequest.command;
            smppheader.status = 0;
            if(abyte0 == null)
                smppheader.length = 16;
            else
                smppheader.length = 16 + abyte0.length;
            smpprequest.sequenceNumber = smppheader.sequence;
            if((smpprequest.command & 0x80000000) == 0)
                pendingRequests.push(smpprequest);
            smppEncoder smppencoder = new smppEncoder();
            try
            {
                smppencoder.smppHeader(smppheader);
            }
            catch(encoderException encoderexception)
            {
                throw new SMSException(encoderexception);
            }
            if(debugon)
                log("HEADER: " + smppencoder);
            byte abyte1[] = smppencoder.getBytes();
            byte abyte2[];
            if(abyte0 != null)
                abyte2 = new byte[abyte1.length + abyte0.length];
            else
                abyte2 = new byte[abyte1.length];
            for(int i = 0; i < abyte1.length; i++)
                abyte2[i] = abyte1[i];

            if(abyte0 != null)
            {
                for(int j = 0; j < abyte0.length; j++)
                    abyte2[j + abyte1.length] = abyte0[j];

            }
            out.write(abyte2);
        }
        catch(IOException _ex)
        {
            bindtype = 0;
            disconnected = true;
            disconnectedError = 10010;
            throw new IOException("SMSC Connection closed (remotely)");
        }
        catch(InterruptedException _ex)
        {
            throw new SMSException(10011);
        }
        finally
        {
            if(debugon)
                log("*** FINISH");
            finished();
            if(debugon)
                log("*** FINISHED");
        }
    }

    public void get(GetCustomerResponse getcustomerresponse, Customer customer)
        throws SMSException, IOException
    {
        if(customer == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        try
        {
            smppencoder.getCustomer(customer);
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
        putRequest(new smppRequest(20, customer, getcustomerresponse), smppencoder);
    }

    public void send(SendResponse sendresponse, Message message)
        throws SMSException, IOException
    {
        if(message == null)
            throw new SMSException(10014);
        smppEncoder smppencoder = new smppEncoder();
        try
        {
            if(message.recipients != null)
            {
                smppencoder.submitMulti(message);
                putRequest(new smppRequest(33, message, sendresponse), smppencoder);
                return;
            }
            if(debugon)
                log("encoding");
            smppencoder.submit(message);
            if(debugon)
                log("new request");
            smppRequest smpprequest = new smppRequest(4, message, sendresponse);
            if(debugon)
                log("put request");
            putRequest(smpprequest, smppencoder);
            if(debugon)
            {
                log("put request done");
                return;
            }
        }
        catch(encoderException encoderexception)
        {
            throw new SMSException(encoderexception);
        }
    }

    public void send(Message message)
        throws SMSException, IOException
    {
        send(null, message);
        getSyncResponse();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区三区在线| 精品一区二区精品| 青椒成人免费视频| 91蝌蚪porny| 国产午夜精品美女毛片视频| 日韩av电影免费观看高清完整版| 成人黄动漫网站免费app| 精品处破学生在线二十三| 亚洲一区免费在线观看| 99国产精品久久| 中文字幕精品三区| 精品一区二区三区不卡| 555夜色666亚洲国产免| 一区二区三区精品在线| 91视频xxxx| 中文字幕佐山爱一区二区免费| 国产福利91精品一区二区三区| 精品国产一区二区国模嫣然| 日韩精品一级二级 | 日本在线播放一区二区三区| 99re这里只有精品首页| 国产精品传媒在线| 成人午夜激情视频| 欧美国产激情一区二区三区蜜月| 激情图片小说一区| 日韩女优制服丝袜电影| 久久精品国产精品亚洲红杏| 日韩午夜激情av| 六月丁香婷婷久久| 91精品国产手机| 蜜桃视频第一区免费观看| 日韩欧美高清在线| 久久91精品国产91久久小草| 久久亚区不卡日本| 成人精品国产一区二区4080| 中文字幕一区二区三区在线不卡| 成人综合婷婷国产精品久久免费| 日本一区二区综合亚洲| av一区二区三区四区| 亚洲蜜臀av乱码久久精品 | av中文字幕在线不卡| 国产精品久久影院| av电影在线观看一区| 一二三区精品福利视频| 欧美日韩一区二区欧美激情| 免费观看日韩av| 久久影院午夜论| 成人av电影免费在线播放| 亚洲人吸女人奶水| 欧美日韩国产一级二级| 日韩av一区二区三区四区| 欧美精品一区二区三区蜜桃视频 | 中文字幕乱码久久午夜不卡 | 国产精华液一区二区三区| 欧美高清在线精品一区| 色噜噜夜夜夜综合网| 日本美女一区二区三区| 国产日韩欧美一区二区三区乱码 | 日韩国产高清在线| 久久九九影视网| 色综合天天视频在线观看 | 国产调教视频一区| 色综合久久中文综合久久97| 日韩精品成人一区二区三区| 久久人人97超碰com| 色婷婷久久久久swag精品 | 欧美性做爰猛烈叫床潮| 久久66热偷产精品| 伊人开心综合网| 精品久久久久久久一区二区蜜臀| av网站免费线看精品| 日本亚洲三级在线| ...中文天堂在线一区| 日韩欧美国产电影| 99久久精品免费看国产免费软件| 肉丝袜脚交视频一区二区| 中日韩av电影| 91精品欧美综合在线观看最新 | 亚洲精品日产精品乱码不卡| 日韩欧美国产午夜精品| 91成人免费网站| 国产.精品.日韩.另类.中文.在线.播放| 一级特黄大欧美久久久| 欧美激情在线看| 日韩精品最新网址| 欧美女孩性生活视频| 99国产精品久久久久| 国产suv精品一区二区三区| 日本不卡高清视频| 夜夜爽夜夜爽精品视频| 中文字幕制服丝袜一区二区三区 | 久久久久久久综合日本| 3751色影院一区二区三区| 色狠狠一区二区三区香蕉| 丁香婷婷综合激情五月色| 麻豆一区二区在线| 亚洲va欧美va天堂v国产综合| 日韩毛片视频在线看| 日本一区二区三区在线不卡| 欧美变态tickle挠乳网站| 欧美肥大bbwbbw高潮| 色网站国产精品| 99久久国产综合精品女不卡| 国产福利91精品一区| 国产精品中文有码| 国产一区激情在线| 国产精品一二一区| 国产精品一二三四区| 国产真实精品久久二三区| 麻豆精品在线看| 日本sm残虐另类| 全部av―极品视觉盛宴亚洲| 日本欧美久久久久免费播放网| 午夜不卡av在线| 日韩电影一区二区三区四区| 秋霞午夜av一区二区三区 | 午夜视频在线观看一区| 亚洲国产视频网站| 丝袜亚洲另类丝袜在线| 日本美女一区二区| 久久99国产精品麻豆| 国产成人亚洲综合a∨婷婷图片 | 国产精品国产三级国产三级人妇| 国产精品热久久久久夜色精品三区| 中文字幕欧美三区| 亚洲美女视频在线| 亚洲高清免费在线| 免费看黄色91| 国产大片一区二区| 91色九色蝌蚪| 欧美巨大另类极品videosbest | 高清国产一区二区三区| 91亚洲国产成人精品一区二区三| 欧美中文字幕不卡| 91精品欧美久久久久久动漫| 久久久不卡影院| 亚洲男人电影天堂| 蜜桃av噜噜一区| 成人听书哪个软件好| 欧洲国产伦久久久久久久| 日韩欧美中文字幕精品| 国产亚洲成年网址在线观看| 亚洲精品成人少妇| 美女在线观看视频一区二区| 成人av高清在线| 欧美丝袜丝交足nylons图片| 欧美tickling网站挠脚心| 国产精品丝袜黑色高跟| 婷婷久久综合九色国产成人| 国产成人福利片| 欧美日韩国产成人在线91 | 久久精品亚洲麻豆av一区二区| 国产精品久久久久婷婷二区次 | 亚洲制服欧美中文字幕中文字幕| 看电影不卡的网站| 一本久久a久久精品亚洲| 欧美xingq一区二区| 亚洲女同一区二区| 激情av综合网| 欧美三电影在线| 中文字幕电影一区| 精品综合免费视频观看| 欧美主播一区二区三区| 久久久久9999亚洲精品| 五月天激情综合| 99久久综合色| 精品精品国产高清a毛片牛牛| 有码一区二区三区| 国产成人免费视频| 欧美电影免费观看高清完整版在线| 亚洲精品日韩专区silk| 风流少妇一区二区| 亚洲精品在线网站| 日韩成人午夜精品| 欧美专区在线观看一区| 亚洲日穴在线视频| 丁香六月久久综合狠狠色| 欧美va亚洲va在线观看蝴蝶网| 亚洲国产精品久久艾草纯爱| 国产丶欧美丶日本不卡视频| 91精品国产综合久久香蕉麻豆| 亚洲午夜一区二区三区| 色一情一乱一乱一91av| 国产精品国产三级国产专播品爱网| 国内成+人亚洲+欧美+综合在线| 欧美日韩国产三级| 亚洲高清久久久| 欧美综合亚洲图片综合区| 亚洲靠逼com| 色综合天天综合色综合av| 136国产福利精品导航| 狠狠网亚洲精品| 日韩精品一区国产麻豆| 蜜桃一区二区三区在线观看| 91精品国产麻豆| 三级不卡在线观看| 日韩欧美一二区| 九九国产精品视频| 久久精品夜色噜噜亚洲a∨| 国产91精品一区二区麻豆亚洲|