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

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

?? abstractmessenger.java

?? jxta平臺的開發包
?? JAVA
字號:
/* * * $Id: AbstractMessenger.java,v 1.6 2006/01/05 18:28:43 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.endpoint;import java.io.IOException;import java.io.InterruptedIOException;import net.jxta.util.AbstractSimpleSelectable;import net.jxta.util.SimpleSelectable;/** * An AbstractMessenger is used to implement messengers (for example, by transport modules). * It supplies the convenience, bw compatible, obvious, or otherwise rarely changed methods. * Many method cannot be overloaded in order to ensure standard behaviour. * The rest is left to implementations. * * @see net.jxta.endpoint.EndpointService * @see net.jxta.endpoint.EndpointAddress * @see net.jxta.endpoint.Message **/public abstract class AbstractMessenger extends AbstractSimpleSelectable implements Messenger {        /**     * The default Maximum Transmission Unit. Currently it is not enforced but at least     * that much can always be sent. All messengers getMTU method return this.     **/    protected static final long DEFAULT_MTU = 65536L;    /**     * The destination address of messages sent on this messenger.     * This member is protected because some transport messengers believe in reading it.     * FIXME - jice@jxta.org 20040413: fix transports.     **/    protected final EndpointAddress dstAddress;    /**     * The stateLock that we share with the implementation.     * This permits to implement waitState in a totally generic way: waitState depends only on the lock     * (provided at construction), and on getState(), supplied by the implementation.     **/    private Object stateLock;    /**     * Create a new abstract messenger.     *     * Warning: This class needs to know the object on which to waitState must synchronize. It is generally impossible     * to pass it at construction because it is not yet constructed. Instead implementations MUST call {@link #setStateLock}     * from their constructor.     *     * @param dest who messages should be addressed to     **/    public AbstractMessenger( EndpointAddress dest ) {        dstAddress = (EndpointAddress) dest.clone();    }    /**     *  {@inheritDoc}     *     *  <p/>A simple implementation for debugging. Don't depend upon this format.     **/    public String toString() {        return super.toString() + "{" + dstAddress.toString() +"}";    }        /**     * Specifies the object on which waitState must synchronize.     *     * @param stateLock The object on which waitState must synchronize. This has to be the object that gets notified when the     * implementation changes its state. Changing state is defined as "any operation that causes the result of the     * <code>getState</code> method to change". Implementations that use the MessengerState state machine should typically use the     * MessengerState object as their state lock, but it is not assumed.     **/    protected void setStateLock(Object stateLock) {        this.stateLock = stateLock;    }    /*     * Messenger methods implementations.     */    /**     * {@inheritDoc}     *     * <p/> This is here for backward compatibility reasons.  The notion of long term unemployment still exists, but is no-longer part     * of the API.  Self closing for unemployment is now a built-in feature of messengers.     **/    public final boolean isIdle() {        return false;    }        /**     * {@inheritDoc}     **/    public final boolean isSynchronous() {        return false;    }    /**     * {@inheritDoc}     **/    public EndpointAddress getDestinationAddress() {        return (EndpointAddress) dstAddress.clone();    }    /**     * {@inheritDoc}     **/    public EndpointAddress getDestinationAddressObject() {        return dstAddress;    }    /**     * {@inheritDoc}     **/    public long getMTU() {        return DEFAULT_MTU;    }    /**     * {@inheritDoc}     *     * <p/> This is a minimal implementation. It may not detect closure     * initiated by the other side unless the messenger was actually used     * since. A more accurate (but not mandatory implementation) would     * actually go and check the underlying connection, if relevant...unless     * breakage initiated by the other side is actually reported asynchronously     * when it happens. Breakage detection from the other side need not     * be reported atomically with its occurence. This not very important     * since we canonicalize transport messengers and so do not need to     * aggressively collect closed ones. When not used, messengers die by themselves.     *     **/    public boolean isClosed() {        return ((getState() & USABLE) == 0);    }        /**     * {@inheritDoc}     **/    public final void flush() throws IOException {        int currentState = 0;        try {            currentState = waitState(IDLE, 0);        } catch(InterruptedException ie) {            InterruptedIOException iio = new InterruptedIOException();            iio.initCause(ie);            throw iio;        }        if ((currentState & (CLOSED | USABLE)) != 0) {            return;        }        throw new IOException("Messenger was unexpectedly closed.");    }    /**     * {@inheritDoc}     **/    public final boolean sendMessage( Message msg ) throws IOException {        return sendMessage( msg, null, null );    }    /**     * {@inheritDoc}     *     * @deprecated Implements deprecated method. Actual support only provided by channels.     **/    public void sendMessage(Message msg, String service, String serviceParam, OutgoingMessageEventListener listener) {        throw new UnsupportedOperationException("This legacy method is not supported by this messenger.");    }    /**     * {@inheritDoc}     **/    public final boolean sendMessage( Message msg, String rService, String rServiceParam ) throws IOException {        // We have to retrieve the failure from the message and throw it if its an IOException, this is what the API        // says that this method does.        if (sendMessageN(msg, rService, rServiceParam)) {            return true;        }        Object failed = msg.getMessageProperty(Messenger.class);        if ((failed == null) || !(failed instanceof OutgoingMessageEvent)) {            // huh ?            return false;        }        Throwable t = ((OutgoingMessageEvent) failed).getFailure();        if (t == null) {            // Must be saturation, then. (No throw for that).            return false;        }        // Now see how we can manage to throw it.        if (t instanceof IOException) {            throw (IOException) t;        }        if (t instanceof RuntimeException) {            throw (RuntimeException) t;        }        if (t instanceof Error) {            throw (Error) t;        }                IOException failure = new IOException( "Failure sending message" );        failure.initCause( t );                throw failure;    }    /**     * {@inheritDoc}     *     * <p/> This method synchronizes on the lock object supplied at construction.     **/    public final int waitState(int wantedStates, long timeout) throws InterruptedException {                synchronized(stateLock) {            if (timeout == 0) {                while ((wantedStates & getState()) == 0) {                    stateLock.wait();                }                return getState();            }            if (timeout < 0 ) {                stateLock.wait(timeout); // let it throw the appropriate error.            }            long start = System.currentTimeMillis();            long end = start + timeout;            if( end < start ) {                end = Long.MAX_VALUE;            }            long left = end - start;            while ((left > 0) && (wantedStates & getState()) == 0) {                stateLock.wait(left);                left = end - System.currentTimeMillis();            }            return getState();        }    }    /*     * SimpleSelectable implementation.     */    /**     * Implements a default for all AbstractMessengers: mirror the event to our selectors. This is what is needed by all the     * known AbstractMessengers that register themselves somewhere. (That is ChannelMessengers).     * FIXME - jice@jxta.org 20040413: Not sure that this is the best default.     *     * @param changedObject Ignored.     **/    public void itemChanged(SimpleSelectable changedObject) {        notifyChange();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品在线播放| 国产精品免费av| 久久久久国产一区二区三区四区| 久久蜜桃av一区精品变态类天堂| 欧美国产综合一区二区| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲国产一区二区视频| 美女视频网站久久| 成人av在线影院| 欧美色男人天堂| 久久久久久久久免费| 亚洲精选一二三| 免费观看在线色综合| caoporen国产精品视频| 777亚洲妇女| 国产精品视频一二三区 | 成人av手机在线观看| 欧美在线观看视频一区二区| 日韩欧美国产精品| 亚洲黄色小视频| 国产成人av电影在线观看| 91黄色免费版| 久久久久久电影| 五月天网站亚洲| www.成人在线| 欧美成人vr18sexvr| 亚洲另类中文字| 黑人精品欧美一区二区蜜桃| 91久久一区二区| 国产亚洲一区二区在线观看| 亚洲午夜久久久久久久久久久| 国产美女精品人人做人人爽| 欧美日韩在线三级| 免费高清不卡av| 色婷婷av一区二区三区gif| 久久久国产午夜精品| 同产精品九九九| 一本久久综合亚洲鲁鲁五月天| 欧美变态凌虐bdsm| 亚洲国产一区二区视频| 99久久夜色精品国产网站| 欧美精品一区二区三区一线天视频| 一区二区三区国产| www.欧美.com| 中文字幕欧美日本乱码一线二线| 麻豆精品蜜桃视频网站| 在线视频国内自拍亚洲视频| 欧美国产在线观看| 激情综合网激情| 91精品国产入口| 亚洲一区二区av在线| 91丨九色丨尤物| 国产精品久久久久天堂| 国产精品911| 欧美精品一区二区三区蜜桃 | 91精品国产综合久久蜜臀| 亚洲精品久久7777| 粉嫩一区二区三区性色av| 日韩欧美一级精品久久| 首页综合国产亚洲丝袜| 欧美午夜精品一区二区蜜桃 | 一本大道av伊人久久综合| 中文乱码免费一区二区| 懂色av噜噜一区二区三区av| 精品久久一二三区| 久草在线在线精品观看| 欧美一区二区精品久久911| 三级亚洲高清视频| 欧美日韩情趣电影| 午夜精品久久一牛影视| 欧美性受xxxx| 亚洲成人精品一区二区| 色素色在线综合| 亚洲一级不卡视频| 欧美日本一区二区在线观看| 日韩高清欧美激情| 日韩久久久久久| 极品少妇xxxx精品少妇| 精品国产不卡一区二区三区| 久99久精品视频免费观看| 精品国产一区久久| 国产精品1区2区3区在线观看| 久久久www免费人成精品| 国产69精品久久久久毛片| 亚洲国产精品99久久久久久久久| 成人自拍视频在线| 亚洲欧美偷拍卡通变态| 在线精品视频一区二区三四 | 91精品国产日韩91久久久久久| 欧美猛男男办公室激情| 日本免费新一区视频| 日韩免费看的电影| 国产精品69久久久久水密桃| 中文字幕不卡一区| 日本丰满少妇一区二区三区| 亚洲成在人线免费| 日韩午夜小视频| 国产成人av电影在线观看| 亚洲女人小视频在线观看| 欧美日韩日本视频| 激情另类小说区图片区视频区| 欧美激情一区二区三区不卡 | 亚洲成人免费影院| 欧美www视频| 97se亚洲国产综合自在线不卡| 一区二区三区精品在线观看| 欧美精品国产精品| 国产精品一区二区三区网站| 中文字幕一区二区三区蜜月| 欧美日韩专区在线| 国产在线精品视频| 亚洲欧洲综合另类在线| 日韩欧美亚洲国产精品字幕久久久| 国产成人免费视频网站| 亚洲一区中文在线| 精品久久一区二区| 91福利国产精品| 精品一区二区免费看| 亚洲精品一卡二卡| 欧美成人女星排名| 91麻豆精东视频| 久久99久久99精品免视看婷婷| 国产精品国产自产拍在线| 欧美日韩成人综合在线一区二区| 国产一区二区三区观看| 亚洲制服欧美中文字幕中文字幕| 日韩美女一区二区三区| 91视视频在线观看入口直接观看www | 国产不卡一区视频| 亚洲v中文字幕| 国产精品色在线观看| 91精品久久久久久蜜臀| 色综合一区二区三区| 国内精品国产三级国产a久久| 一区二区三区在线观看视频| 337p日本欧洲亚洲大胆色噜噜| 一本久久综合亚洲鲁鲁五月天 | 中文字幕一区二区三区在线播放| 欧美一区二区三区小说| 91一区二区三区在线观看| 国模套图日韩精品一区二区 | 日韩一二三区不卡| 在线视频综合导航| 粉嫩绯色av一区二区在线观看| 色噜噜狠狠成人网p站| 国产黄色精品网站| 日本成人中文字幕在线视频| 亚洲激情网站免费观看| 亚洲国产精品99久久久久久久久| 日韩欧美亚洲一区二区| 欧美日本不卡视频| 日本黄色一区二区| 播五月开心婷婷综合| 国产一区二区三区免费观看| 日本网站在线观看一区二区三区| 亚洲激情成人在线| 亚洲三级电影网站| 国产精品不卡在线| 欧美激情中文字幕一区二区| 精品av久久707| 欧美一区二区三区播放老司机| 欧美在线一二三| 91麻豆123| 91老师国产黑色丝袜在线| 成人综合在线视频| 床上的激情91.| 高清不卡在线观看| 国产白丝网站精品污在线入口| 国产麻豆精品久久一二三| 麻豆一区二区三| 美女脱光内衣内裤视频久久网站 | 精品国免费一区二区三区| 91麻豆精品国产| 欧美日韩精品电影| 色8久久人人97超碰香蕉987| 色欧美片视频在线观看| 99久久伊人精品| 91小视频在线| 欧洲人成人精品| 欧美性视频一区二区三区| 在线观看免费一区| 欧美日韩国产综合一区二区三区| 欧美日韩一区二区三区不卡 | 看国产成人h片视频| 奇米色一区二区| 久久国产视频网| 国产一区二区三区免费看| 国产69精品一区二区亚洲孕妇| 成人一级黄色片| 91丝袜美腿高跟国产极品老师| 91亚洲国产成人精品一区二区三| 色av一区二区| 欧美日韩免费观看一区二区三区| 欧美精品色综合| 日韩一区二区三区视频| 精品国产亚洲一区二区三区在线观看 | 一区二区日韩av| 偷拍一区二区三区四区| 麻豆成人久久精品二区三区红 | 国产精品女同互慰在线看|