| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * This file is part of Dorado 7.x (http://dorado7.bsdn.org). |
| | | * |
| | | * Copyright (c) 2002-2012 BSTEK Corp. All rights reserved. |
| | | * |
| | | * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) |
| | | * and BSDN commercial (http://www.bsdn.org/licenses) licenses. |
| | | * |
| | | * If you are unsure which license is appropriate for your use, please contact the sales department |
| | | * at http://www.bstek.com/contact. |
| | | */ |
| | | |
| | | package com.bstek.dorado.core; |
| | | |
| | | import java.rmi.dgc.VMID; |
| | | |
| | | import org.apache.commons.lang.StringUtils; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | *è°æ´æ¾ç¤ºä¿¡æ¯ |
| | | * |
| | | * ç¨äºè·ååç§Doradoåºæ¬ä¿¡æ¯çå·¥å
፱ȋ |
| | | * @author Benny Bao (mailto:benny.bao@bstek.com) |
| | | * @since Feb 27, 2007 |
| | | */ |
| | | public class DoradoAbout { |
| | | private static String instanceId = new VMID().toString(); |
| | | private static long instantiationTime = System.currentTimeMillis(); |
| | | |
| | | /** |
| | | * è¿å产ååç§°ã |
| | | */ |
| | | public static String getProductTitle() { |
| | | return "dorado"; |
| | | } |
| | | |
| | | /** |
| | | * è¿å产åæä¾åã |
| | | */ |
| | | public static String getVendor() { |
| | | return "dorado"; |
| | | } |
| | | |
| | | /** |
| | | * è¿å产åçæ¬å·ã |
| | | */ |
| | | public static String getVersion() { |
| | | Package pkg = DoradoAbout.class.getPackage(); |
| | | String version = null; |
| | | if (pkg != null) version = pkg.getImplementationVersion(); |
| | | if (StringUtils.isEmpty(version)) version = instanceId; |
| | | return version; |
| | | } |
| | | |
| | | /** |
| | | * è¿ådoradoçå®ä¾idã |
| | | */ |
| | | public static String getInstanceId() { |
| | | return instanceId; |
| | | } |
| | | |
| | | /** |
| | | * è¿å该doradoçå®ä¾çå建æ¶é´ã |
| | | */ |
| | | public static long getInstantiationTime() { |
| | | return instantiationTime; |
| | | } |
| | | } |