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

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

?? inprotocol.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
package mujmail.protocols;/*MujMail - Simple mail client for J2MECopyright (C) 2006 Nguyen Son Tung <n.sontung@gmail.com>Copyright (C) 2008 David Hauzar <david.hauzar.mujmail@gmail.com>This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */import java.util.Hashtable;import java.util.Stack;import java.util.Vector;import mujmail.BodyPart;import mujmail.InBox;import mujmail.Lang;import mujmail.MessageHeader;import mujmail.MujMail;import mujmail.MyException;import mujmail.Settings;import mujmail.TheBox;import mujmail.account.MailAccount;import mujmail.connections.ConnectionCompressed;import mujmail.connections.ConnectionInterface;import mujmail.tasks.BackgroundTask;import mujmail.tasks.Progress;import mujmail.tasks.StoppableBackgroundTask;import mujmail.tasks.StoppableProgress;import mujmail.ui.AudioAlert;import mujmail.util.Decode;import mujmail.util.Functions;/** * The interface for manipulating and downloading mails. * For communication with servers uses the object of class BasicConnection */public abstract class InProtocol {    /** The name of this source file */    private static final String SOURCE_FILE = "InProtocol";    /** Flag signals if we want to print debug prints */    private static final boolean DEBUG = false;    private static final Object notifier = new Object(); /// Object on which wait fo beeing notify    protected InProtocolTask inProtocolTask;        /** The body part that is actually parsed. */    private BodyPart actuallyParsedBodyPart;        // TODO (Betlista): describe these constants, why have REDOWNLOAD_BODY (3) and GET_URL (5) same description?    //thread run modes    public static final byte GET_NEW_MAILS = 1;    public static final byte RETRIEVE_BODY = 2; //retrieving mail bodies    public static final byte REDOWNLOAD_BODY = 3; //reretreving mail bodies - redownload incompleted mails    public static final byte REMOVE_MAILS = 4;    public static final byte GET_URL = 5; //reretreving mail bodies - redownload incompleted mails    public static final byte SAVE_MAIL_SENT = 6;    public static final byte POLL = 8;    public static final byte SET_FLAGS = 9;    public static final byte REMOVE_FLAGS = 10;    public static final byte CONVERT_BODY = 11;    public static final byte CLOSE = 16;         byte runMode = -1;    byte reDownloadMode = -1; //-1 for redownloading the whole mail, values >= 0 for redownloading particular bodypart only    static short instanceRunning = 0; //counts how many threads ALL subclasses of Inprotocol are running    short threadCount = 0; //counts how many threads a single subclass of Inprotocol are running			    boolean locked; //for thread synchronizing    boolean forcedDisc; //if it should disconnect from the server unconditionally		    MailAccount account; //each server has an account    private TheBox reportBox = null;    /** The box to that the action of this object is associated. That means the box to that mails are actually downloded etc. */    public InBox targetBox = null;    MessageHeader actHeader; //a header which should be fetched	    protected ConnectionInterface connection;    //mailsOnServer store message unique identifier(UID) and message number of mails on the server    //its used for faster accessing to the message number     //and detecting if a concrete mail is on the server - used for inbox-server sync    //keys are UID(String) objects are message numbers(String) in the case of POP3,     //in case the case of IMAP4 objects are just random number, because we don't need to operate with message numbers in IMAP implementation	    Hashtable mailsOnServer;    String END_OF_MAIL; //a string that indicates the end of transmitting of a mail body    String saveMailData;  // data to save into server mailbox if saving on server set on    String flagsToSet = "()";        public InProtocol(MailAccount account) {        //super("In protocol task");        this.account = account;        connection = new ConnectionCompressed();        mailsOnServer = new Hashtable();    }    //return if the object is busy    public boolean isBusy() {        return (threadCount > 0) ? true : false;    }    /**     * Handles input flags - set processed message header flags according to      * these flags.     * @param flags the part of protocol line with flags     */    protected void handleFlags(MessageHeader msgHeader, String flags) {        if (DEBUG) { System.out.println("DEBUG InProtocol.handleFlags " + actHeader); }        if (flags.indexOf("\\Seen") != -1) {            msgHeader.markAsRead();        }        if (flags.indexOf("\\Answered") != -1) {            msgHeader.markAsReplied();        }        if (flags.indexOf("\\Deleted") != -1) {            msgHeader.markAsDeleted();        }        if (flags.indexOf("\\Flagged") != -1) {            msgHeader.markAsFlagged();        }    }        //zvysi counter pocet bezicich threadu    protected synchronized void inThread() {        ++threadCount;    }    protected synchronized void decThread() {        --threadCount;    }    //returns if some of all instances (POP, IMAP, SPOP..) of inProtocol are running, resp. if the class Inprotocol is busy.    public static boolean isBusyGlobal() {        return instanceRunning > 0 ? true : false;    }    protected synchronized void incThreadGlobal() {        ++instanceRunning;    }    protected synchronized void decThreadGlobal() {        --instanceRunning;        synchronized(notifier) {            notifier.notifyAll();        }    }    public void stop() {        if (isBusy()) {            connection.quit();        }    }    /*     * TODO (Betlista): add JavaDoc comment     */    public abstract int countNew() throws MyException;    protected synchronized void lock() {        try {            while (locked) {                wait(100);            }        } catch (InterruptedException e) {        }        locked = true;    }    protected void unlock() {        locked = false;    }    //add a mail to a queue of mails that are going to be deleted from the server    abstract public void addDeleted(MessageHeader header);    public boolean containsMail(MessageHeader header) {        return mailsOnServer.containsKey(header.getMessageID());    }    //synchronized to ensure no other threads are changing runMode    //all these methods must be run in a thread    /**     * Retrieve mails from server     * @param box Target inbox where add mails     */    public synchronized void getNewMails(InBox box) {          if (DEBUG) System.out.println("DEBUG InProtocol.getNewMails(InBox) - getting new mails");        incThreadGlobal();        runMode = InProtocol.GET_NEW_MAILS;        this.targetBox = box;        this.reportBox = box;        inProtocolTask = new InProtocolTask(this, "Getting new mails");        inProtocolTask.start(targetBox, MujMail.mujmail.getMenu());    }    /**     * This method should be called if polling discovers mail with given ID.     * @param ID id of new mail that was discovered by polling.     * @return true if this is new email: that means that it  was not yet     *  downloaded.     */    protected boolean handleMailDiscoveredByPolling(String ID) {            if (!getTargetBox().wasOnceDownloaded(account.getEmail(), ID)) {                if (Settings.pollDownloadsMails) {                    getNewMails( getTargetBox());                }                if (Settings.pollPlaysSound) {                    new AudioAlert();                }                return true;            }        return false;    }    /**     * Blocks calling thread until no InProtocol action of any InProtocol     * instance is running.     */    public static void waitForNotBusyGlobal() {        try {            synchronized(notifier) {                if (!isBusyGlobal()) return;                notifier.wait();            }        } catch (Exception e) {            System.out.println(e.toString());            e.printStackTrace();        }    }    /**     * Finds first new mail while polling. The connection is already open.     * @throws mujmail.MyException     */    protected abstract void findFirstNewMailWhilePolling() throws MyException;    /**     * <p>Opens the connection.</p>     * <p>Note: task can be null (polling).</p>     *      * @param task     * @return     * @throws mujmail.MyException     */    protected abstract boolean open(BackgroundTask task) throws MyException;    private void resolveMyExceptionWhileRunning(MyException ex) {        if (ex.getErrorCode() == MyException.COM_HALTED) {            connection.unQuit();        }        resolveExceptions(ex.getDetails() + "/ " + account.getEmail(), SOURCE_FILE);    }    protected abstract void getNewMails();    protected abstract void downloadBody();    protected abstract void removeMails();    protected abstract void setFlags();    protected abstract void removeFlags();    protected abstract void getURL() throws MyException;    public void doWork() {        //polling is an extra thread, is not counted by inThread() or inThreadGlobal()        if (doPolling()) return;        //if its a forced disconnect, then we will not wait for someone by calling lock()        if (runMode == InProtocol.CLOSE && forcedDisc) {            closeForceDist();            return;        }        try {            //we use lock() instead of making run() synchronized in order to allow forced disconnecting from servers            //even some jobs are still running            lock();            inThread();            getReportBox().report(Lang.get(Lang.ALRT_INITIATING) + Lang.get(Lang.ALRT_WAIT), SOURCE_FILE); // Not in background task no setTitle

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色悠悠亚洲一区二区| 免费高清成人在线| 爽好久久久欧美精品| 国产一区二区三区视频在线播放 | 久久精品人人做人人综合 | 制服丝袜中文字幕亚洲| 国产日本欧美一区二区| 天天免费综合色| 成人毛片在线观看| 日韩一区二区在线观看视频 | 成人免费福利片| 91麻豆精品国产自产在线观看一区 | 国产亚洲精久久久久久| 久久网站最新地址| 欧美视频在线观看一区| 久久久99精品久久| 久草热8精品视频在线观看| 欧洲在线/亚洲| 中文字幕一区二区三区在线不卡 | 久久久国产精华| 奇米在线7777在线精品| 日本韩国精品在线| 国产午夜精品理论片a级大结局 | 制服丝袜中文字幕一区| 亚洲福利一区二区三区| 色呦呦国产精品| 亚洲日本免费电影| 99精品久久久久久| 国产精品久久久久久久久免费相片 | 亚洲欧美日韩国产综合| 国产精品一区免费在线观看| 欧美xxxx在线观看| 日韩黄色片在线观看| 在线观看免费亚洲| 亚洲男女一区二区三区| 99久久婷婷国产综合精品电影| 欧美国产综合一区二区| 国产精品一级片在线观看| 欧美精品一区二区三区四区| 美女视频一区在线观看| 欧美成人r级一区二区三区| 蜜桃免费网站一区二区三区| 51久久夜色精品国产麻豆| 亚洲成人免费看| 在线观看一区二区精品视频| 99国产精品一区| 亚洲欧洲综合另类在线| 日本精品视频一区二区三区| 一区二区久久久久| 欧美日韩日日骚| 美女高潮久久久| wwww国产精品欧美| 丰满岳乱妇一区二区三区| 中文一区在线播放| 色婷婷亚洲一区二区三区| 亚洲成人动漫一区| 日韩欧美在线1卡| 懂色av中文一区二区三区| 亚洲欧洲99久久| 欧美日韩亚洲综合在线| 麻豆免费看一区二区三区| 国产欧美一区二区三区沐欲| 99精品欧美一区二区蜜桃免费| 亚洲国产日韩a在线播放性色| 欧美一二三区在线| 成人免费视频国产在线观看| 亚洲va韩国va欧美va精品| 日韩精品在线一区| 99久久伊人久久99| 日本强好片久久久久久aaa| 国产嫩草影院久久久久| 欧美色电影在线| 国产东北露脸精品视频| 亚洲免费观看在线视频| 精品少妇一区二区三区在线播放| 成人理论电影网| 青椒成人免费视频| 亚洲va欧美va人人爽| 中文av一区特黄| 欧美成人精品福利| 欧美午夜影院一区| 国产综合成人久久大片91| 亚洲激情第一区| 久久久久成人黄色影片| 欧美午夜一区二区三区免费大片| 国产精品一二三| 七七婷婷婷婷精品国产| 亚洲男同性恋视频| 国产日本一区二区| 欧美一区二区视频在线观看2020 | 国产精品免费久久久久| 色婷婷久久久综合中文字幕| 国内精品在线播放| 亚洲一区二区3| 亚洲欧洲成人av每日更新| 久久婷婷成人综合色| 这里只有精品视频在线观看| 91啪在线观看| 99久久99精品久久久久久 | www激情久久| 91精品在线观看入口| 一本大道av一区二区在线播放| 国产精品影视在线观看| 黑人巨大精品欧美黑白配亚洲| 亚洲午夜久久久久久久久电影网| 国产欧美精品国产国产专区| 日韩精品一区二区三区在线播放 | 97成人超碰视| 成人免费看黄yyy456| 久久97超碰国产精品超碰| 性做久久久久久久久| 亚洲自拍偷拍av| 一区二区三区在线看| 亚洲美女视频在线观看| 亚洲私人黄色宅男| 国产精品第13页| 国产精品欧美一区喷水| 国产精品免费久久久久| 国产精品国产三级国产a| 中文字幕欧美日本乱码一线二线| 国产婷婷色一区二区三区四区 | 国产精品久久影院| 精品国产一区二区三区久久影院 | 亚洲美女屁股眼交3| 亚洲裸体xxx| 一二三区精品福利视频| 亚洲综合久久av| 亚洲主播在线播放| 国产精品久久久久久户外露出| www.日韩精品| 成人sese在线| 一本色道久久综合精品竹菊| 欧美中文字幕一区二区三区| 欧美午夜精品一区二区蜜桃| 欧美精品高清视频| 欧美tickling挠脚心丨vk| 欧美成人a∨高清免费观看| 中文字幕精品一区二区精品绿巨人| 国产精品色眯眯| 一区2区3区在线看| 麻豆国产91在线播放| 国产成人综合在线播放| 色婷婷一区二区三区四区| 欧美日韩国产三级| 久久久午夜电影| 亚洲人123区| 精品在线免费观看| 91亚洲精品一区二区乱码| 欧美高清精品3d| 国产亚洲精品超碰| 亚洲成人自拍一区| 国产精品18久久久久久久网站| 91视频在线看| 欧美成人一区二区三区在线观看| 国产精品毛片a∨一区二区三区| 亚洲精品日日夜夜| 黄色成人免费在线| 99re8在线精品视频免费播放| 欧美高清视频不卡网| 亚洲欧洲美洲综合色网| 三级欧美在线一区| 99精品在线观看视频| 制服丝袜国产精品| 日韩理论片在线| 激情综合网av| 欧美视频三区在线播放| 久久综合九色综合97婷婷| 亚洲一区二区三区美女| 国产在线看一区| 欧美日本在线观看| 国产精品嫩草影院av蜜臀| 日本色综合中文字幕| 欧美性极品少妇| 亚洲色图视频网站| 国产伦精一区二区三区| 欧美久久久久久蜜桃| 亚洲精品少妇30p| 91一区二区三区在线播放| 久久久91精品国产一区二区精品 | 人人爽香蕉精品| 色综合色综合色综合| 国产欧美日韩不卡免费| 琪琪一区二区三区| 91精品国产综合久久久蜜臀粉嫩| 日韩美女视频一区| 国产不卡一区视频| 26uuu精品一区二区在线观看| 日韩av一级电影| 欧美日韩一区三区| 亚洲精品亚洲人成人网| 91偷拍与自偷拍精品| 国产精品女主播av| 99视频国产精品| 中文字幕乱码亚洲精品一区| 国产美女视频91| 久久精品亚洲乱码伦伦中文| 久久精品久久久精品美女| 4438成人网| 日本美女一区二区三区| 88在线观看91蜜桃国自产|