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

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

?? authenticationmgr.java

?? 一個(gè)java方面的消息訂閱發(fā)送的源碼
?? JAVA
字號(hào):
/**
 * Redistribution and use of this software and associated documentation
 * ("Software"), with or without modification, are permitted provided
 * that the following conditions are met:
 *
 * 1. Redistributions of source code must retain copyright
 *    statements and notices.  Redistributions must also contain a
 *    copy of this document.
 *
 * 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 name "Exolab" must not be used to endorse or promote
 *    products derived from this Software without prior written
 *    permission of Exoffice Technologies.  For written permission,
 *    please contact info@exolab.org.
 *
 * 4. Products derived from this Software may not be called "Exolab"
 *    nor may "Exolab" appear in their names without prior written
 *    permission of Exoffice Technologies. Exolab is a registered
 *    trademark of Exoffice Technologies.
 *
 * 5. Due credit should be given to the Exolab Project
 *    (http://www.exolab.org/).
 *
 * THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
 * ``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
 * EXOFFICE TECHNOLOGIES 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.
 *
 * Copyright 2003-2004 (C) Exoffice Technologies Inc. All Rights Reserved.
 */
package org.exolab.jms.authentication;

import java.security.Principal;

import org.exolab.jms.service.BasicService;
import org.exolab.jms.service.ServiceException;
import org.exolab.jms.net.connector.Authenticator;
import org.exolab.jms.net.connector.ResourceException;
import org.exolab.jms.common.security.BasicPrincipal;


/**
 * This is the active authentication component within the JMS server.
 *
 * @version     $Revision: 1.1 $ $Date: 2004/11/26 01:50:39 $
 * @author      <a href="mailto:knut@lerpold">Knut Lerpold</a>
 */
public class AuthenticationMgr extends BasicService implements Authenticator {

    /**
     * The user manager
     */
    private UserManager _users;

    /**
     * The service name of the authentication manager
     */
    private static final String AM_SERVICE_NAME = "AuthenticationManager";

    /**
     * The singleton instance of the authentication manager.
     */
    private static volatile AuthenticationMgr _instance;


    /**
     * Construct a new <code>AuthenticationManager</code>
     *
     * @throws ServiceException if the service cannot be initialised
     */
    private AuthenticationMgr() throws ServiceException {
        super(AM_SERVICE_NAME);
        _users = new UserManager();
    }

    /**
     * Create and return an instance of the singleton.
     *
     * @return the singleton instance
     * @throws ServiceException if the service cannot be created
     */
    public static AuthenticationMgr createInstance() throws ServiceException {
        _instance = new AuthenticationMgr();
        return _instance;
    }

    /**
     * Return an instance to the AuthenticationMgr singleton. This method
     * assumes that the singleton has already been created with a call to
     * {@link #createInstance}
     *
     * @return the singleton instance
     */
    public static AuthenticationMgr instance() {
        return _instance;
    }

    // implement BasicService.run
    public void run() {
        // do nothing
    }

    // override BasicService.stop
    public void stop() throws ServiceException {
        // destroy the user manager.
        _users.destroy();

        // clear the static reference
        _instance = null;
    }

    /**
     * Create a user.
     *
     * @param user the user to create
     * @return <code>true</code> if the user is created
     * otherwise <code>false</code>
     */
    public boolean addUser(User user) {
        return _users.createUser(user);
    }

    /**
     * Remove this user
     *
     * @param user the user to remove
     * @return <code>true</code> if the user is removed
     * otherwise <code>false</code>
     */
    public boolean removeUser(User user) {
        return _users.deleteUser(user);
    }

    /**
     * Gets a user.
     *
     * @param user the user
     * @return User
     */
    public User getUser(User user) {
        return _users.getUser(user);
    }

    /**
     * Update a user.
     *
     * @param user the user to update
     * @return <code>true</code> if the password is updated
     * otherwise <code>false</code>
     */
    public boolean updateUser(User user) {
        return _users.updateUser(user);
    }

    /**
     * Validate the password for the specified user.
     *
     * @param username the user's name
     * @param password the password to check
     * @return <code>true</code> if the username and password exist, otherwise
     * <code>false</code>
     */
    public boolean validateUser(String username, String password) {
        return _users.validateUser(username, password);
    }

    /**
     * Determines if a principal has permissions to connect
     *
     * @param principal the principal to check
     * @return <code>true</code> if the principal has permissions to connect
     */
    public boolean authenticate(Principal principal) {
        String user = null;
        String password = null;
        if (principal instanceof BasicPrincipal) {
            BasicPrincipal basic = (BasicPrincipal) principal;
            user = basic.getName();
            password = basic.getPassword();
        } else {
            // treat everything else as unauthenticated/unknown user
        }
        return validateUser(user, password);
    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人av福利| 亚洲人成在线观看一区二区| 久久精品视频在线看| 亚洲天堂中文字幕| 亚洲综合久久av| 麻豆高清免费国产一区| 国模大尺度一区二区三区| 久久日韩粉嫩一区二区三区| 国产69精品久久久久777| 国产精品日日摸夜夜摸av| 成人综合日日夜夜| 夜夜精品视频一区二区| 欧美精品日韩综合在线| 美女视频黄久久| 国产精品萝li| 欧美精品日韩一区| 国产福利一区二区| 一区二区视频免费在线观看| 91精品国产综合久久小美女| 国产很黄免费观看久久| 一区二区三区精品| 欧美精品一区二区久久婷婷| 成人激情图片网| 一区二区三区在线免费| 日韩午夜在线观看视频| 国产不卡在线一区| 午夜日韩在线电影| 中文字幕成人在线观看| 欧美性做爰猛烈叫床潮| 久草在线在线精品观看| 综合久久一区二区三区| 日韩精品一区二区三区四区视频 | 蜜桃91丨九色丨蝌蚪91桃色| 久久精品人人爽人人爽| 欧美日韩国产综合视频在线观看| 老司机免费视频一区二区三区| 国产精品国产自产拍高清av | 中文字幕在线播放不卡一区| 亚洲国产精品ⅴa在线观看| 国产在线精品一区二区夜色| 综合网在线视频| 欧美电影免费观看高清完整版在线观看 | 国产精品久久久久久久久快鸭| 久久这里只有精品6| 久久男人中文字幕资源站| 久久久99精品免费观看不卡| 日本一区二区三区视频视频| 国产精品久久久久久久久免费樱桃 | 国产在线精品免费| 国内精品写真在线观看| 国产成人在线视频免费播放| 国产福利不卡视频| 99精品一区二区三区| 在线观看亚洲一区| 欧美日韩成人综合天天影院| 欧美一区二区在线看| 26uuu亚洲综合色| 国产精品色婷婷| 一区二区日韩电影| 日韩精品三区四区| 国产精品99久久久久久久vr| 成人精品国产一区二区4080| 欧美最猛性xxxxx直播| 欧美高清视频不卡网| 精品国产乱码久久久久久免费| 久久精品人人爽人人爽| 亚洲色图欧洲色图| 五月婷婷另类国产| 韩国午夜理伦三级不卡影院| 国产精品原创巨作av| 99在线精品免费| 在线精品亚洲一区二区不卡| 日韩免费一区二区三区在线播放| 日本一区免费视频| 午夜精品爽啪视频| 国产成人免费视频| 欧美日韩日日夜夜| 久久久91精品国产一区二区精品| 亚洲精品第一国产综合野| 毛片av一区二区| 97久久人人超碰| 777午夜精品视频在线播放| 亚洲国产高清aⅴ视频| 日韩制服丝袜av| a在线播放不卡| 精品理论电影在线观看| 亚洲精品视频在线观看网站| 捆绑调教美女网站视频一区| 97se亚洲国产综合在线| 欧美大片国产精品| 一区二区三区影院| 国产精品一区二区免费不卡| 欧美色网一区二区| 国产精品久久久久久亚洲毛片 | 99久久国产综合色|国产精品| 精品视频在线看| 中文字幕中文在线不卡住| 黑人巨大精品欧美黑白配亚洲| 91啪在线观看| 中文字幕av一区二区三区免费看| 日本在线不卡一区| 在线精品视频小说1| 国产精品灌醉下药二区| 久久精品国产99国产| 欧美三级日韩三级国产三级| 综合欧美一区二区三区| 国产精品亚洲午夜一区二区三区| 9191国产精品| 亚洲国产精品影院| 色综合久久久久久久久| 国产精品麻豆视频| 国产999精品久久久久久绿帽| 欧美一二三区在线| 三级在线观看一区二区| 在线看一区二区| 综合精品久久久| 春色校园综合激情亚洲| 久久女同性恋中文字幕| 久久精品理论片| 这里只有精品免费| 亚洲天堂成人网| 欧美精品一区二区三区高清aⅴ| 国产精品资源在线| 久久99国产精品免费网站| 亚洲高清视频中文字幕| 国产精品嫩草影院com| 色悠悠亚洲一区二区| 欧美疯狂性受xxxxx喷水图片| 日韩欧美视频一区| 日本亚洲免费观看| 欧美日韩不卡一区二区| 午夜不卡av在线| 欧美日韩免费观看一区三区| 一区二区三区蜜桃网| 日本久久精品电影| 亚洲一卡二卡三卡四卡五卡| 91天堂素人约啪| 亚洲自拍都市欧美小说| 欧美伊人久久久久久午夜久久久久| 亚洲色图20p| 色综合久久久久久久久久久| 亚洲综合视频在线| 欧美日韩在线一区二区| 日本在线不卡一区| 日韩欧美一二三区| 久久疯狂做爰流白浆xx| 精品捆绑美女sm三区| 国产999精品久久| 亚洲女人****多毛耸耸8| 欧美三级午夜理伦三级中视频| 国产精品99久久久久| 欧美激情一区三区| 91网站在线观看视频| 亚洲图片一区二区| 欧美一激情一区二区三区| 国产精品一卡二卡| 中文字幕中文字幕一区二区| 在线亚洲高清视频| 麻豆极品一区二区三区| 欧美国产亚洲另类动漫| 色悠悠久久综合| 欧美aa在线视频| 国产三级精品视频| 欧美伊人久久大香线蕉综合69| 日韩精品亚洲专区| 国产欧美日韩三区| 在线视频你懂得一区| 精品在线亚洲视频| 成人免费在线视频观看| 欧美挠脚心视频网站| 狠狠色丁香久久婷婷综合_中| 一色屋精品亚洲香蕉网站| 欧美无砖专区一中文字| 国产一区二区导航在线播放| 亚洲美女偷拍久久| 精品成a人在线观看| 色欧美日韩亚洲| 久久精品999| 亚洲主播在线播放| 26uuu久久综合| 欧美偷拍一区二区| 懂色av一区二区在线播放| 亚洲国产欧美在线人成| 久久精品亚洲精品国产欧美| 欧美在线观看视频在线| 国内精品伊人久久久久av影院| 亚洲乱码中文字幕综合| 精品国产1区2区3区| 欧美三级中文字幕| 波多野结衣中文一区| 视频一区二区三区中文字幕| 中文字幕第一区综合| 日韩精品一区二区三区四区| 欧美中文字幕一区二区三区亚洲| 国内精品自线一区二区三区视频| 亚洲一区二区成人在线观看| 国产精品国产精品国产专区不蜜| 日韩午夜精品视频| 欧美视频在线一区二区三区| 国产**成人网毛片九色|