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

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

?? blockingmessenger.java

?? jxta平臺的開發包
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * * $Id: BlockingMessenger.java,v 1.13 2006/04/18 00:51:27 bondolo Exp $ * * Copyright (c) 2004 Sun Microsystems, Inc.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in *    the documentation and/or other materials provided with the *    distribution. * * 3. The end-user documentation included with the redistribution, *    if any, must include the following acknowledgment: *       "This product includes software developed by the *       Sun Microsystems, Inc. for Project JXTA." *    Alternately, this acknowledgment may appear in the software itself, *    if and wherever such third-party acknowledgments normally appear. * * 4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" *    must not be used to endorse or promote products derived from this *    software without prior written permission. For written *    permission, please contact Project JXTA at http://www.jxta.org. * * 5. Products derived from this software may not be called "JXTA", *    nor may "JXTA" appear in their name, without prior written *    permission of Sun. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED.  IN NO EVENT SHALL SUN MICROSYSTEMS OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of Project JXTA.  For more * information on Project JXTA, please see * <http://www.jxta.org/>. * * This license is based on the BSD license adopted by the Apache Foundation. */package net.jxta.impl.endpoint;import java.util.Timer;import java.util.TimerTask;import java.io.IOException;import java.io.InterruptedIOException;import org.apache.log4j.Level;import org.apache.log4j.Logger;import net.jxta.endpoint.AbstractMessenger;import net.jxta.endpoint.ChannelMessenger;import net.jxta.endpoint.EndpointAddress;import net.jxta.endpoint.Message;import net.jxta.endpoint.Messenger;import net.jxta.endpoint.MessengerState;import net.jxta.endpoint.OutgoingMessageEvent;import net.jxta.peergroup.PeerGroupID;import net.jxta.util.SimpleSelectable;import net.jxta.impl.util.TimeUtils;import net.jxta.impl.util.TimerThreadNamer;/** * This class is a near-drop-in replacement for the previous BlockingMessenger class. * To subclassers (that is, currently, transports) the only difference is that some * overloaded methods have a different name (class hierarchy reasons made it impossible * to preserve the names without forcing an API change for applications). * * The other difference which is not API visible, is that it implements the * standard MessengerState behaviour and semantics required by the changes in the endpoint framework. * * This the only base messenger class meant to be extended by outside code that is in the impl tree. The * reason being that what it replaces was there already and that new code should not become dependant upon it. * **/public abstract class BlockingMessenger extends AbstractMessenger {    /**     *  Log4J Logger     **/    private final static transient Logger LOG = Logger.getLogger(BlockingMessenger.class.getName());    /**     * The self destruct timer.     *     * <p/>When a messenger has become idle, it is closed. As a side effect, it      * makes the owning canonical messenger, if any, subject to removal if it is      * otherwise unreferenced.     **/    private final static transient Timer timer = new Timer( "BlockingMessenger self destruct timer", true );    /*     * Actions that we defer to after returning from event methods. In other words, they cannot be done with the lock held, or     * they require calling more event methods.  Because this messenger can take only one message at a time (saturated while     * sending), actions do not cascade much. Start can lead to connect if the sending fails, but, because we always fail to     * connect, connect will not lead to start. As a result we can get away with performing deferred actions recursively. That     * simplifies the code.     */    /**     * No action deferred.     **/    private static final int ACTION_NONE = 0;    /**     * Must send the current message.     **/    private static final int ACTION_SEND = 1;    /**     * Must report failure to connect.     **/    private static final int ACTION_CONNECT = 2;    /**     * The outstanding message.     **/    private Message currentMessage = null;    /**     * The serviceName override for that message.     **/    private String currentService = null;    /**     * The serviceParam override for that message.     */    private String currentParam = null;    /**     * The exception that caused that message to not be sent.     **/    private Throwable currentThrowable = null;    /**     * true if we have deliberately closed our one message input queue.     **/    private boolean inputClosed = false;    /**     * Need to know which group this transport lives in, so that we can suppress        channel redirection when in the same group. This is currently the norm.     **/    private final PeerGroupID homeGroupID;    /**     * The current deferred action.     **/    private int deferredAction = ACTION_NONE;    /**     * Reference to owning object. This is there so that the owning object is not subject to garbage collection     * unless this object here becomes itself unreferenced. That happens when the self destruct timer closed it.     **/    private Object owner = null;    /**     * The timer task watching over our self destruction requirement.     **/    private final TimerTask selfDestructTask;    /**     * State lock and engine.     **/    private final BlockingMessengerState stateMachine = new BlockingMessengerState();    /**     * legacy artefact: transports need to believe the messenger is not yet closed in order to actually close it.     * So we lie to them just while we run their closeImpl method so that they do not see that the messenger is     * officially closed.     **/    private boolean lieToOldTransports = false;    /**     * Our statemachine implementation; just connects the standard AbstractMessengerState action methods to     * this object.     **/    private class BlockingMessengerState extends MessengerState {        protected BlockingMessengerState() {            super(true);        }        /*         * The required action methods.         */        /**         *  {@inheritDoc}         */        protected void connectAction() {            deferredAction = ACTION_CONNECT;        }        /**         *  {@inheritDoc}         */        protected void startAction() {            deferredAction = ACTION_SEND;        }        /**         *  {@inheritDoc}         */        protected void closeInputAction() {            // we're synchonized here. (invoked from stateMachine).            inputClosed = true;        }        /**         *  {@inheritDoc}         */        protected void closeOutputAction() {            // This will break the cnx; thereby causing a down event if we have a send in progress.            // If the cnx does not break before the current message is sent, then the message will be sent successfully,            // resulting in an idle event. Either of these events is enough to complete the shutdown process.            lieToOldTransports = true;            closeImpl();            lieToOldTransports = false;            // Disconnect from the timer.            if (selfDestructTask != null) {                selfDestructTask.cancel();            }        }        // This is a synchronous action. No synchronization needed: we're already synchronized, here.        // There's a subtlety here: we do not clear the current message. We let sendMessageB or sendMessageN        // deal with it, so that they can handle the status reporting each in their own way. So basically, all we        // do is to set a reason for that message to fail in case we are shutdown from the outside and that message        // is not sent yet. As long as there is a current message, it is guaranteed that there is a thread        // in charge of reporting its status. It is also guaranteed that when failAll is called, the input is        // already closed, and so, we have no obligation of making room for future messages immediately.        // All this aggravation is so that we do not have to create one context wrapper for each message just so        // that we can associate it with its result. Instead we use our single msg and single status model        // throughout.        protected void failAllAction() {            if (currentMessage == null) {                return;            }            if (currentThrowable == null) {                currentThrowable = new IOException("Messenger unexpectedly closed");            }        }    }    /**     * The implementation of channel messenger that getChannelMessenger returns:     * All it does is address rewritting. Even close() is forwarded to the shared messenger.     * The reason is that BlockingMessengers are not really shared; they're transitional     * entities used directly by CanonicalMessenger. GetChannel is used only to provide address     * rewritting when we pass a blocking messenger directly to incoming messenger listeners...this     * practice is to be removed in the future, in favor of making incoming messengers full-featured     * async messengers that can be shared.     **/    private final class BlockingMessengerChannel extends ChannelMessenger {        public BlockingMessengerChannel( EndpointAddress baseAddress, PeerGroupID redirection,                                         String origService, String origServiceParam ) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美群妇大交群的观看方式| 亚洲成人1区2区| 99久久综合色| 日韩成人午夜电影| 国产精品人妖ts系列视频| 欧美日韩一卡二卡| www.色综合.com| 九九**精品视频免费播放| 亚洲免费观看高清完整版在线观看| 7777女厕盗摄久久久| 99久久99久久免费精品蜜臀| 91丝袜美腿高跟国产极品老师 | 日韩欧美国产一二三区| 国产欧美在线观看一区| 国产精品一区一区| 国产精品久久久久久亚洲伦 | 欧美一区日本一区韩国一区| 国产一区二区三区在线观看免费 | 久久久久久久久99精品| 91久久线看在观草草青青| 久久网站最新地址| 精品在线你懂的| 奇米色一区二区| 91原创在线视频| 欧美极品美女视频| 国产91丝袜在线播放0| 国产欧美精品一区二区色综合朱莉| zzijzzij亚洲日本少妇熟睡| 国产精品久久久久久久岛一牛影视 | 日韩丝袜美女视频| 成人av一区二区三区| 美女一区二区在线观看| 免费精品视频在线| 欧洲人成人精品| 在线观看亚洲专区| 国产精品毛片久久久久久久| 欧美三级日韩在线| 色婷婷综合在线| 91在线看国产| 成人黄色综合网站| 成人自拍视频在线观看| 国产a区久久久| 国产成a人亚洲| 丁香婷婷综合五月| 成人av先锋影音| 亚洲婷婷综合久久一本伊一区| 色播五月激情综合网| 日本va欧美va欧美va精品| 亚洲男女一区二区三区| 久久精品欧美日韩| 欧美成人精品高清在线播放| 91无套直看片红桃| 国产成人精品亚洲777人妖| 1区2区3区欧美| 久久久99精品免费观看不卡| 国产农村妇女毛片精品久久麻豆| 尤物视频一区二区| 懂色av一区二区三区免费看| 欧美精品第一页| 亚洲综合区在线| hitomi一区二区三区精品| 精品国产欧美一区二区| 亚洲小说春色综合另类电影| 国产盗摄一区二区| 欧美电影免费观看高清完整版 | 亚洲18色成人| 久久电影国产免费久久电影| 91黄色免费看| 一区视频在线播放| 国产老肥熟一区二区三区| 日韩视频免费观看高清在线视频| 亚洲日本成人在线观看| 成人综合激情网| 久久久精品国产免大香伊| 日韩黄色免费网站| 欧美日韩大陆一区二区| 亚洲午夜一区二区| 色婷婷激情一区二区三区| 中文字幕一区二| 极品少妇一区二区| 91精品久久久久久久99蜜桃| 日韩在线a电影| 欧美一区二区在线看| 麻豆国产精品官网| 日韩免费高清av| 精品亚洲国内自在自线福利| 337p日本欧洲亚洲大胆色噜噜| 青青草国产精品97视觉盛宴| 亚洲精品一区二区精华| 国产自产高清不卡| 中文字幕一区二区在线观看| 色老汉一区二区三区| 亚洲h精品动漫在线观看| 91精品国产综合久久久久久| 久久成人久久鬼色| 国产农村妇女毛片精品久久麻豆| av网站免费线看精品| 午夜视频一区二区| 久久新电视剧免费观看| 91丨porny丨国产入口| 亚洲123区在线观看| 欧美国产日韩精品免费观看| 欧美性猛片aaaaaaa做受| 黄页网站大全一区二区| 一区二区三区日韩精品| 日韩久久久精品| 亚洲高清在线视频| 色香色香欲天天天影视综合网| 精品国产91洋老外米糕| 一区二区三区电影在线播| 国产v综合v亚洲欧| 一区二区三区四区精品在线视频| 青青草国产成人av片免费| 91.xcao| 国产精品系列在线| 韩国午夜理伦三级不卡影院| 91麻豆精品国产无毒不卡在线观看 | 色婷婷狠狠综合| 日本一区二区三区电影| 狠狠色丁香久久婷婷综合_中| 欧美日韩视频在线观看一区二区三区 | 国产精品一区二区久激情瑜伽| 欧美曰成人黄网| 亚洲欧洲一区二区三区| 国产福利一区二区| 久久网站热最新地址| 精品一区二区三区不卡| 日韩欧美精品三级| 免费日本视频一区| 欧美一区二区三区公司| 石原莉奈在线亚洲二区| 欧美日韩国产电影| 亚洲aaa精品| 7777精品伊人久久久大香线蕉完整版 | 色久优优欧美色久优优| 一区在线观看免费| 91在线观看视频| 亚洲欧美日韩久久| 色菇凉天天综合网| 一区二区免费在线| 欧美日韩激情在线| 同产精品九九九| 欧美一区日韩一区| 久草热8精品视频在线观看| 欧美大片在线观看一区二区| 久久精品国产亚洲5555| 精品国产a毛片| 国产精品影视网| 欧美国产精品久久| 91一区一区三区| 一级精品视频在线观看宜春院| 日韩视频免费直播| 美美哒免费高清在线观看视频一区二区| 欧美日韩另类一区| 日产欧产美韩系列久久99| 538在线一区二区精品国产| 日韩**一区毛片| 精品va天堂亚洲国产| 高清成人在线观看| 伊人婷婷欧美激情| 欧美军同video69gay| 久久av老司机精品网站导航| 久久久亚洲午夜电影| 99精品国产99久久久久久白柏| 一区二区三区四区高清精品免费观看| 欧美日韩亚州综合| 国产在线精品视频| 亚洲丝袜精品丝袜在线| 欧美精品久久99| 国产精品自拍三区| 亚洲女女做受ⅹxx高潮| 91精品国产入口| 国产成人精品aa毛片| 亚洲综合图片区| 欧美精品一区二区三区四区| 一本一道久久a久久精品| 美女www一区二区| 亚洲色欲色欲www| 91精品国产91久久久久久一区二区| 国产成人自拍网| 亚洲福利一二三区| 国产丝袜美腿一区二区三区| 色婷婷综合激情| 国产乱人伦偷精品视频免下载| 一区二区三区日韩欧美精品| 2021国产精品久久精品| 日本丰满少妇一区二区三区| 国产一区久久久| 水野朝阳av一区二区三区| 国产精品进线69影院| 91精品一区二区三区久久久久久 | 日韩一卡二卡三卡四卡| 99麻豆久久久国产精品免费优播| 蜜臀国产一区二区三区在线播放| 成人免费在线观看入口| 欧美白人最猛性xxxxx69交| 欧美性xxxxxxxx| 成人动漫视频在线| 国产麻豆成人精品| 日韩电影一二三区|