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

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

?? blockingmessenger.java

?? jxta平臺的開發(fā)包
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
            super(baseAddress, redirection, origService, origServiceParam);            // We tell our super class that we synchronize on the stateMachine object. Althoug it is not obvious, our getState()            // method calls the shared messenger getState() method, which synchronizes on the shared messenger's state machine            // object. So, that's what we must specify.  Logic would dictate that we pass it to super(), but it is not itself            // constructed until super() returns. No way around it.            setStateLock(stateMachine);        }        /**         *  {@inheritDoc}         */        public int getState() {            return BlockingMessenger.this.getState();        }        /**         *  {@inheritDoc}         */        public void resolve() {            BlockingMessenger.this.resolve();        }        /**         *  {@inheritDoc}         */        public void close() {            BlockingMessenger.this.close();        }        /**         *  {@inheritDoc}         *         *  <p/>Address rewritting done here.         */        public boolean sendMessageN( Message msg, String service, String serviceParam ) {            return BlockingMessenger.this.sendMessageN( msg, effectiveService(service), effectiveParam(service, serviceParam) );        }        /**         *  {@inheritDoc}         *         *  <p/>Address rewritting done here.         */        public void sendMessageB( Message msg, String service, String serviceParam ) throws IOException {            BlockingMessenger.this.sendMessageB( msg, effectiveService(service), effectiveParam(service, serviceParam ));        }        /**         *  {@inheritDoc}         *         *  <p/>We're supposed to return the complete destination, including          *  service and param specific to that channel. It is not clear, whether         *  this should include the cross-group mangling, though. For now, let's         *  say it does not.         */        public EndpointAddress getLogicalDestinationAddress() {            EndpointAddress rawLogical = getLogicalDestinationImpl();            if ( rawLogical == null) {                return null;            }            return new EndpointAddress (rawLogical, origService, origServiceParam);        }        // Check if it is worth staying registered        public void itemChanged(Object changedObject) {            if (! notifyChange()) {                if (haveListeners()) {                    return;                }                BlockingMessenger.this.unregisterListener(this);                if (! haveListeners()) {                    return;                 }                // Ooops collision. We should not have unregistered. Next time, then. In case of collision, the end result                // is always to stay registered. There's no harm in staying registered.                BlockingMessenger.this.registerListener(this);            }        }        /**         *  {@inheritDoc}         *         *  <p/>Always make sure we're registered with the shared messenger.         **/        protected void registerListener( SimpleSelectable l ) {            BlockingMessenger.this.registerListener(this);            super.registerListener(l);        }    }    private void storeCurrent(Message msg, String service, String param) {        currentMessage = msg;        currentService = service;        currentParam = param;        currentThrowable = null;    }    /** Constructor.     *     * <p/>We start in the CONNECTED state, we pretend to have a queue of size 1, and we can never re-connect.  Although this     * messenger fully respects the asynchronous semantics, it is saturated as soon as one msg is being send, and if not     * saturated, send is actually performed by the invoker thread. So return is not completely immediate.  This is a barely     * acceptable implementation, but this is also a transition adapter that is bound to disappear one release from now. The main     * goal is to get things going until transports are adapted.     *     * @param homeGroupID the group that this messenger works for. This is the group of the endpoint service or transport     * that created this messenger.     * @param dest where messages should be addressed to     * @param selfDestruct true if this messenger must self close destruct when idle. <b>Warning:</b> If selfDestruct is used,     * this messenger will remained referenced for as long as isIdleImpl returns false.     **/    public BlockingMessenger( PeerGroupID homeGroupID, EndpointAddress dest, boolean selfDestruct ) {        super(dest);        this.homeGroupID = homeGroupID;        // We tell our superclass that we synchronize our state on the stateMachine object.  Logic would dictate that we pass it        // to super(), but it is not itself constructed until super() returns. No way around it.        setStateLock(stateMachine);        /*         * Sets up a timer task that will close this messenger if it says to have become idle. It will keep it referenced         * until then.<p/>         *         * As long as this timer task is scheduled, this messenger is not subject to GC. Therefore, its owner, if any, which is strongly         * referenced, is not subject to GC either. This avoids prematurely closing open connections just because a destination is         * not currently in use, which we would have to do if CanonicalMessengers could be GCed independantly (and which would         * force us to use finalizers, too).<p/>         *         * Such a mechanism is usefull only if this blocking messenger is expensive to make or holds system resources that require         * an explicit invocation of the close method. Else, it is better to let it be GC'ed along with any refering canonical         * messenger when memory is tight.<p/>         *         */        //        // FIXME - jice@jxta.org 20040413: we trust transports to implement isIdle reasonably, which may be a leap of faith. We        // should probably superimpose a time limit of our own.        //        if (selfDestruct) {            selfDestructTask = new TimerTask() {                    public void run() {                        try {                            try {                                if (isIdleImpl()) {                                    close();                                }                            } finally {                                cancel();                            }                        } catch (Throwable uncaught ) {                            if (LOG.isEnabledFor(Level.ERROR)) {                                LOG.error("Uncaught Throwable in selfDescructTask. Perpetrator: ", uncaught);                            }                        }                    }                };            timer.schedule(selfDestructTask, TimeUtils.AMINUTE, TimeUtils.AMINUTE);        } else {            selfDestructTask = null;        }    }    /**     * Sets an owner for this blocking messenger. Owners are normally canonical messengers. The goal of registering the owner is     * to keep that owner reachable as long as this blocking messenger is.  Canonical messengers are otherwise softly referenced,     * and so, may be deleted whenever memory is tight.     *     * We do not want to use finalizers or the equivalent reference queue mechanism; so we have no idea when a blocking messenger     * is no-longer referenced by any canonical. In addition it may be expensive to make and so we want to keep it for a while     * anyway. As a result, instead of keeping a blocking messenger open as long as there is a canonical, we do the opposite: we     * keep the canonical (owner, here) as long as the blocking messenger is open (and usually beyond, memory allowing). How long     * a blocking messenger will stay around depends upon that messenger's implementation. That may even be left up to the GC, in     * the end (if close is not needed AND the messenger is cheap to make). In that case, the owner is likely the only referer,     * and so both will have the same lifetime.     *     * @param owner The object that should be kept referenced at least as long as this one.     **/    public void setOwner(Object owner) {        this.owner = owner;    }    /**     * A trivial convenience method that transports still depend upon.     * The reason it exists is that it used to be non-trivial, when     * the group redirection would sometimes be done at this point (the     * transports could be asked to send to the non-mangled service and     * param, when the application used the implicit defaults). This is     * no-longer true: the transport (the blocking messenger) is always     * invoked with fully defaulted and mangled service name and param. So     * all we have to do is to paste them all together. Eventually blocking     * messenger could simply be invoked with an already computed     * full destination.     **/    protected EndpointAddress getDestAddressToUse( String service, String serviceParam ) {        EndpointAddress result = getDestinationAddress();                return new EndpointAddress( result, service, serviceParam );    }    /**     * A transport may call this to cause an orderly closure of its messengers.     **/    protected final void shutdown() {        int action;        synchronized(stateMachine) {            stateMachine.shutdownEvent();            action = eventCalled();        }        // We called an event. State may have changed.        notifyChange();        performDeferredAction(action);    }    /**     *     * {@inheritDoc}      *     * We overload isClosed because many messengers still use super.isClosed()      * as part of their own implementation or don't override it at all. They      * expect it to be true only when all is shutdown; not while we're closing      * gently.     *     * FIXME - jice@jxta.org 20040413: transports should get a deeper retrofit eventually.     **/    public boolean isClosed() {        return ((!lieToOldTransports) && (getState() & TERMINAL) != 0);    }    /**     * {@inheritDoc}     *     * <p/> getLogicalDestinationAddress() requires resolution (it's the address advertised by the other end).     * For a blocking messenger it's easy. We're born resolved. So, just ask the implementor what it is.     **/    public final EndpointAddress getLogicalDestinationAddress() {        return getLogicalDestinationImpl();    }    /**     * {@inheritDoc}     *     * <p/> Some transports historically overload the close method of BlockingMessenger.     * The final is there to make sure we know about it. However, there should be no     * harm done if the unchanged code is renamed to closeImpl; even if it calls super.close().     * The real problem, however, is transports calling close (was their own, but now it means this one), when     * they want to break. It will make things look like someone just called close, but it will not     * actually break anything. However, that will cause the state machine to go through the close process.     * this will end up calling closeImpl(). That will do.     */    public final void close() {        int action;        synchronized(stateMachine) {            stateMachine.closeEvent();                        action = eventCalled();        }        // We called an event. State may have changed.        notifyChange();        performDeferredAction(action);    }    /**     * {@inheritDoc}     **/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品电影在线观看| 成人午夜激情视频| 国产女主播一区| 欧美日韩国产精选| 国产精品888| 天天色天天爱天天射综合| 国产精品美女一区二区在线观看| 欧美日高清视频| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 99热99精品| 韩国精品主播一区二区在线观看| 亚洲成人免费影院| 亚洲欧洲99久久| 国产午夜精品一区二区三区嫩草| 日韩一区二区高清| 欧美日韩国产大片| 色综合中文字幕国产| 国产高清不卡一区二区| 久久不见久久见免费视频7| 亚洲香肠在线观看| 亚洲欧美日韩中文播放 | 亚洲一区中文日韩| 国产精品久久综合| 久久久av毛片精品| 日韩欧美一区二区不卡| 91精品国产综合久久蜜臀| 欧美亚洲一区二区在线| 97久久久精品综合88久久| 成人午夜碰碰视频| 国产91高潮流白浆在线麻豆| 精久久久久久久久久久| 日韩av一级电影| 日韩电影在线观看网站| 日韩av午夜在线观看| 日韩中文字幕1| 日韩精品成人一区二区三区| 午夜国产精品一区| 亚洲成年人影院| 亚洲午夜精品在线| 亚洲.国产.中文慕字在线| 亚洲成人av电影在线| 日精品一区二区三区| 蜜桃91丨九色丨蝌蚪91桃色| 久久国产麻豆精品| 九九国产精品视频| 九九久久精品视频| 国产99久久久国产精品潘金网站| 国产91综合一区在线观看| 高清在线不卡av| av电影一区二区| 91高清在线观看| 欧美日韩国产综合久久| 91精品国产综合久久精品| 欧美电影免费观看高清完整版 | 国产精品123| 国产白丝精品91爽爽久久| 成人avav在线| 欧美午夜精品理论片a级按摩| 欧美日韩精品福利| 精品国产成人系列| 亚洲国产精品黑人久久久| 亚洲欧美一区二区在线观看| 亚洲午夜久久久久久久久电影网| 丝袜美腿一区二区三区| 国产精品911| 色噜噜狠狠色综合中国| 欧美久久婷婷综合色| 精品久久人人做人人爽| 中文字幕一区二区在线播放| 午夜精品影院在线观看| 精品一二三四区| 91一区一区三区| 69久久99精品久久久久婷婷| 久久亚洲免费视频| 亚洲视频香蕉人妖| 蜜臀av一级做a爰片久久| 成人高清视频免费观看| 欧美妇女性影城| 中文字幕国产精品一区二区| 午夜影视日本亚洲欧洲精品| 国产一区福利在线| 欧美色图一区二区三区| 久久精品夜色噜噜亚洲a∨| 亚洲欧美福利一区二区| 免费看日韩精品| 91在线云播放| 精品福利视频一区二区三区| 日韩毛片高清在线播放| 麻豆精品一区二区| 在线观看免费视频综合| 久久精品免费在线观看| 亚洲国产sm捆绑调教视频| 国内精品伊人久久久久av一坑 | 亚洲国产cao| 国产精品一品二品| 91精品国产91久久久久久最新毛片| 欧美激情中文字幕| 免费在线观看不卡| 在线观看免费亚洲| 国产欧美一区二区在线观看| 日韩av电影一区| 欧美在线短视频| 椎名由奈av一区二区三区| 日日夜夜免费精品视频| 色婷婷国产精品综合在线观看| 国产亚洲欧美在线| 青青国产91久久久久久| 在线观看国产91| 亚洲色大成网站www久久九九| 久久av资源网| 欧美老肥妇做.爰bbww| 一区二区国产视频| 99国产一区二区三精品乱码| 国产亚洲欧美日韩日本| 美女网站色91| 91精品久久久久久蜜臀| 亚洲国产综合视频在线观看| 色婷婷久久一区二区三区麻豆| 国产亚洲综合性久久久影院| 久久爱www久久做| 6080日韩午夜伦伦午夜伦| 亚洲一二三区在线观看| 色偷偷88欧美精品久久久| 国产精品国产三级国产aⅴ原创 | 91欧美一区二区| 国产精品理论片| 丁香另类激情小说| 久久久国际精品| 国内成人精品2018免费看| 日韩欧美激情四射| 蜜臀国产一区二区三区在线播放| 制服.丝袜.亚洲.另类.中文| 亚洲va在线va天堂| 欧美巨大另类极品videosbest | 亚洲精品视频观看| 色综合久久中文字幕| 性感美女极品91精品| 日本精品视频一区二区三区| 亚洲日本成人在线观看| 99久久精品国产导航| 亚洲欧美日本在线| 欧美性xxxxxx少妇| 午夜免费欧美电影| 欧美一级日韩不卡播放免费| 麻豆精品久久精品色综合| 欧美成人bangbros| 国产一区福利在线| 国产精品成人在线观看| 一本色道久久综合亚洲精品按摩 | 日韩黄色免费电影| 欧美一区二区日韩一区二区| 久草这里只有精品视频| 日韩精品一区二区三区视频播放| 国产美女久久久久| 国产精品第一页第二页第三页 | 久久欧美中文字幕| 99国产精品久久久久久久久久久 | 精品久久久久久亚洲综合网 | 日本中文字幕一区二区视频| 欧美大片国产精品| 国产精品一二一区| 国产精品久久夜| 91国内精品野花午夜精品| 爽爽淫人综合网网站| 精品福利一区二区三区免费视频| 成人精品小蝌蚪| 亚洲一线二线三线久久久| 日韩一区二区三区四区五区六区| 国内精品写真在线观看| 亚洲视频精选在线| 91精品在线一区二区| 国产精品综合二区| 一区二区三区在线影院| 日韩三级在线免费观看| 成人激情开心网| 婷婷开心激情综合| 国产蜜臀97一区二区三区 | 色琪琪一区二区三区亚洲区| 久久er99热精品一区二区| 日韩毛片精品高清免费| 日韩精品一区二区三区视频 | 蜜桃精品视频在线观看| 国产精品久久久久久户外露出 | 亚洲一区成人在线| 久久婷婷国产综合国色天香| 在线欧美日韩国产| 国产一区二区导航在线播放| 亚洲国产精品人人做人人爽| www国产精品av| 欧美日韩国产色站一区二区三区| 国产河南妇女毛片精品久久久| 樱花草国产18久久久久| 国产校园另类小说区| 88在线观看91蜜桃国自产| 不卡的电影网站| 蓝色福利精品导航| 亚洲一区二区三区三| 中文字幕av资源一区| 日韩一二三四区| 欧美色网一区二区|