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

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

?? memoryuser.java

?? struts的源代碼
?? JAVA
字號:
/*
 * $Id: MemoryUser.java 54929 2004-10-16 16:38:42Z germuska $ 
 *
 * Copyright 1999-2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package org.apache.struts.webapp.example.memory;

import java.util.HashMap;
import org.apache.struts.webapp.example.Subscription;
import org.apache.struts.webapp.example.User;
import org.apache.struts.webapp.example.UserDatabase;


/**
 * <p>Concrete implementation of {@link User} for an in-memory
 * database backed by an XML data file.</p>
 *
 * @version $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
 * @since Struts 1.1
 */

public final class MemoryUser implements User {


    // ----------------------------------------------------------- Constructors


    /**
     * <p>Construct a new User associated with the specified
     * {@link UserDatabase}.
     *
     * @param database The user database with which we are associated
     * @param username The username of this user
     */
    public MemoryUser(MemoryUserDatabase database, String username) {

        super();
        this.database = database;
        this.username = username;

    }


    // ----------------------------------------------------- Instance Variables


    /**
     * The {@link UserDatabase} with which we are associated.
     */
    private MemoryUserDatabase database = null;


    /**
     * The {@link Subscription}s for this User, keyed by hostname.
     */
    private HashMap subscriptions = new HashMap();


    /**
     * The username for this user.
     */
    private String username = null;


    // ------------------------------------------------------------- Properties


    /**
     * The {@link UserDatabase} with which we are associated.
     */
    public UserDatabase getDatabase() {
        return (this.database);
    }


    /**
     * The email address from which messages are sent.
     */
    private String fromAddress = null;

    public String getFromAddress() {
        return (this.fromAddress);
    }

    public void setFromAddress(String fromAddress) {
        this.fromAddress = fromAddress;
    }


    /**
     * The full name of this user, included in from addresses.
     */
    private String fullName = null;

    public String getFullName() {
        return (this.fullName);
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }


    /**
     * The password (in clear text).
     */
    private String password = null;

    public String getPassword() {
        return (this.password);
    }

    public void setPassword(String password) {
        this.password = password;
    }


    /**
     * The EMAIL address to which replies should be sent.
     */
    private String replyToAddress = null;

    public String getReplyToAddress() {
        return (this.replyToAddress);
    }

    public void setReplyToAddress(String replyToAddress) {
        this.replyToAddress = replyToAddress;
    }


    /**
     * Find and return all {@link Subscription}s associated with this user.
     * If there are none, a zero-length array is returned.
     */
    public Subscription[] getSubscriptions() {

        synchronized (subscriptions) {
            Subscription results[] = new Subscription[subscriptions.size()];
            return ((Subscription[]) subscriptions.values().toArray(results));
        }

    }


    /**
     * The username (must be unique).
     */
    public String getUsername() {
        return (this.username);
    }


    // --------------------------------------------------------- Public Methods


    /**
     * Create and return a new {@link Subscription} associated with this
     * User, for the specified host name.
     *
     * @param host Host name for which to create a subscription
     *
     * @exception IllegalArgumentException if the host name is not unique
     *  for this user
     */
    public Subscription createSubscription(String host) {

        synchronized (subscriptions) {
            if (subscriptions.get(host) != null) {
                throw new IllegalArgumentException("Duplicate host '" + host
                                                   + "' for user '" +
                                                   username + "'");
            }
            MemorySubscription subscription =
                new MemorySubscription(this, host);
            synchronized (subscriptions) {
                subscriptions.put(host, subscription);
            }
            return (subscription);
        }

    }


    /**
     * Find and return the {@link Subscription} associated with the specified
     * host.  If none is found, return <code>null</code>.
     *
     * @param host Host name to look up
     */
    public Subscription findSubscription(String host) {

        synchronized (subscriptions) {
            return ((Subscription) subscriptions.get(host));
        }

    }


    /**
     * Remove the specified {@link Subscription} from being associated
     * with this User.
     *
     * @param subscription Subscription to be removed
     *
     * @exception IllegalArgumentException if the specified subscription is not
     *  associated with this User
     */
    public void removeSubscription(Subscription subscription) {

        if (!(this == subscription.getUser())) {
            throw new IllegalArgumentException
                ("Subscription not associated with this user");
        }
        synchronized (subscriptions) {
            subscriptions.remove(subscription.getHost());
        }

    }


    /**
     * Return a String representation of this object.
     */
    public String toString() {

        StringBuffer sb = new StringBuffer("<user username=\"");
        sb.append(username);
        sb.append("\"");
        if (fromAddress != null) {
            sb.append(" fromAddress=\"");
            sb.append(fromAddress);
            sb.append("\"");
        }
        if (fullName != null) {
            sb.append(" fullName=\"");
            sb.append(fullName);
            sb.append("\"");
        }
        if (password != null) {
            sb.append(" password=\"");
            sb.append(password);
            sb.append("\"");
        }
        if (replyToAddress != null) {
            sb.append(" replyToAddress=\"");
            sb.append(replyToAddress);
            sb.append("\"");
        }
        sb.append(">");
        return (sb.toString());

    }


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品自拍动漫在线| 欧美一区二区在线播放| 欧美色偷偷大香| 欧美一区二区三区四区视频| 久久久久97国产精华液好用吗| 中文字幕中文字幕在线一区 | 国产成人激情av| 97久久精品人人澡人人爽| 欧美狂野另类xxxxoooo| 久久久蜜桃精品| 亚洲成人av福利| 国产大陆精品国产| 欧美日韩成人综合在线一区二区| 精品少妇一区二区三区在线播放| 亚洲欧美自拍偷拍| 日韩国产欧美在线观看| 成人精品国产免费网站| 欧美猛男男办公室激情| 国产欧美日本一区二区三区| 亚洲国产精品久久人人爱 | 久久久久久久久久美女| 亚洲精品国产品国语在线app| 乱一区二区av| 欧美综合亚洲图片综合区| 久久青草国产手机看片福利盒子 | 欧美日韩五月天| 久久久精品蜜桃| 五月天中文字幕一区二区| 国产精品1024| 91精品国产色综合久久不卡蜜臀| 国产精品高清亚洲| 激情图区综合网| 欧美性大战久久| 中文字幕中文乱码欧美一区二区| 免费成人美女在线观看.| 色国产综合视频| 欧美国产日产图区| 精品中文字幕一区二区| 欧美性受xxxx黑人xyx| 国产精品乱码人人做人人爱| 久久99精品久久久久久国产越南| 欧美在线不卡视频| 亚洲视频在线一区二区| 国产一区免费电影| 欧美一区二区三区视频免费| 亚洲精品ww久久久久久p站| 国产一区二区按摩在线观看| 欧美一区二区三区婷婷月色| 亚洲成人先锋电影| 色综合久久综合网97色综合 | 91视频在线观看免费| xfplay精品久久| 日韩av电影免费观看高清完整版| 91久久人澡人人添人人爽欧美| 国产精品你懂的| 丁香天五香天堂综合| www久久精品| 激情文学综合丁香| 欧美va亚洲va在线观看蝴蝶网| 午夜精品久久久久久久| 在线观看av不卡| 亚洲人成7777| 99久久久免费精品国产一区二区| 国产日产亚洲精品系列| 国产精品香蕉一区二区三区| 久久嫩草精品久久久精品一| 麻豆成人免费电影| 日韩一区二区在线免费观看| 日韩黄色在线观看| 欧美精品vⅰdeose4hd| 日韩激情一区二区| 91麻豆精品91久久久久同性| 亚洲123区在线观看| 欧美蜜桃一区二区三区| 日韩av午夜在线观看| 日韩欧美亚洲国产另类| 精品一区二区三区视频在线观看 | 国产一区激情在线| 久久久久国产成人精品亚洲午夜| 国产激情91久久精品导航| 久久久九九九九| 成人18视频在线播放| 亚洲欧美偷拍卡通变态| 欧洲国产伦久久久久久久| 亚洲成a人v欧美综合天堂| 91精品国产品国语在线不卡| 久久成人免费电影| 国产女人18毛片水真多成人如厕| 成人一二三区视频| 亚洲欧美一区二区三区国产精品| 91久久人澡人人添人人爽欧美| 五月天精品一区二区三区| 日韩亚洲欧美高清| 国产乱码精品一区二区三区av | 91亚洲资源网| 一区二区三区在线视频观看| 欧美日韩夫妻久久| 激情综合五月婷婷| 国产精品久久久久桃色tv| 色婷婷久久久久swag精品 | 欧美老年两性高潮| 老司机精品视频在线| 久久综合丝袜日本网| 99国产精品久久久| 丝袜美腿亚洲色图| 久久亚洲二区三区| 91亚洲永久精品| 欧美aⅴ一区二区三区视频| 久久久久久久国产精品影院| 一道本成人在线| 六月丁香综合在线视频| 自拍偷拍欧美激情| 欧美一区二区人人喊爽| 成人黄色在线网站| 天堂蜜桃91精品| 国产清纯白嫩初高生在线观看91 | 日韩专区一卡二卡| 久久久久国产精品麻豆| 在线观看日韩高清av| 国产自产高清不卡| 一区二区三区四区乱视频| 精品卡一卡二卡三卡四在线| 99riav一区二区三区| 蜜臀va亚洲va欧美va天堂| 国产精品久久久久久久久动漫 | 视频在线在亚洲| 国产免费观看久久| 6080午夜不卡| 成人av影院在线| 免费在线观看精品| 亚洲精品中文在线| 久久奇米777| 欧美日本在线看| 99久久综合精品| 看电视剧不卡顿的网站| 亚洲精品日韩综合观看成人91| www精品美女久久久tv| 欧美日韩国产免费| 成年人午夜久久久| 国产在线麻豆精品观看| 午夜精品久久久久久久久久| 国产精品福利av | 国产.精品.日韩.另类.中文.在线.播放| 亚洲国产精品久久久久婷婷884| 国产人伦精品一区二区| 日韩欧美国产一区在线观看| 在线亚洲欧美专区二区| 成人午夜短视频| 精品系列免费在线观看| 亚洲不卡av一区二区三区| 最新久久zyz资源站| 久久久久久久久岛国免费| 91精品国产麻豆| 欧美在线观看你懂的| 91网站在线观看视频| 国产福利不卡视频| 狠狠狠色丁香婷婷综合激情| 日韩中文字幕一区二区三区| 尤物av一区二区| 亚洲人123区| 中文一区二区完整视频在线观看| 欧美大片国产精品| 91精品国产色综合久久久蜜香臀| 欧美在线一二三四区| 色婷婷久久综合| 一本色道久久综合亚洲91| www.在线欧美| 豆国产96在线|亚洲| 国产精品亚洲一区二区三区妖精 | 久久久91精品国产一区二区精品| 日韩丝袜情趣美女图片| 欧美乱妇23p| 欧美日韩国产美| 欧美另类videos死尸| 欧美福利一区二区| 欧美日韩成人在线| 欧美老年两性高潮| 在线不卡一区二区| 7777精品伊人久久久大香线蕉完整版 | 精品黑人一区二区三区久久| 日韩欧美一区在线| 日韩免费观看高清完整版在线观看| 欧美乱妇15p| 日韩丝袜情趣美女图片| 欧美大片一区二区| 2024国产精品视频| 久久麻豆一区二区| 日本一区二区综合亚洲| 欧美国产精品一区二区三区| 日本一二三不卡| 国产精品污www在线观看| 国产精品你懂的| 亚洲精品视频在线| 亚洲一级在线观看| 蜜臀av一区二区在线免费观看| 久久精品国产免费| 国产电影精品久久禁18| 成人高清在线视频| 欧美亚洲禁片免费| 在线播放一区二区三区|