⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 endentityprofilenameproxy.java

📁 JAVA做的J2EE下CA认证系统 基于EJB开发
💻 JAVA
字号:
/************************************************************************* *                                                                       * *  EJBCA: The OpenSource Certificate Authority                          * *                                                                       * *  This software is free software; you can redistribute it and/or       * *  modify it under the terms of the GNU Lesser General Public           * *  License as published by the Free Software Foundation; either         * *  version 2.1 of the License, or any later version.                    * *                                                                       * *  See terms of license at gnu.org.                                     * *                                                                       * *************************************************************************/ /* * cProfileNameProxy.java * * Created on den 23 juli 2002, 17:49 */package se.anatom.ejbca.webdist.rainterface;import java.util.HashMap;import se.anatom.ejbca.log.Admin;import se.anatom.ejbca.ra.raadmin.IRaAdminSessionLocal;/** * A class used to improve performance by proxying end entity profileid to profilename mappings by minimizing the number of needed lockups over rmi. *  * @author  TomSelleck * @version $Id: EndEntityProfileNameProxy.java,v 1.8 2005/05/09 19:50:38 anatom Exp $ */public class EndEntityProfileNameProxy implements java.io.Serializable {        /** Creates a new instance of ProfileNameProxy */    public EndEntityProfileNameProxy(Admin administrator, IRaAdminSessionLocal raadminsession){              // Get the RaAdminSession instance.      this.raadminsession = raadminsession;              profilenamestore = new HashMap();       this.administrator = administrator;      }        /**     * Method that first tries to find profilename in local hashmap and if it doesn't exists looks it up over RMI.     *     * @param profileid the profile id number to look up.     * @return the profilename or null if no profilename is relatied to the given id     */    public String getEndEntityProfileName(int profileid) {      String returnval = null;        // Check if name is in hashmap      returnval = (String) profilenamestore.get(new Integer(profileid));            if(returnval==null){        // Retreive profilename        returnval = raadminsession.getEndEntityProfileName(administrator, profileid);        if(returnval != null)          profilenamestore.put(new Integer(profileid),returnval);      }                 return returnval;    }        // Private fields    private HashMap profilenamestore;    private IRaAdminSessionLocal raadminsession;    private Admin   administrator;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -