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

📄 getetctool.java

📁 UCS (Ultra Corba Simulator) is one more powerful corba client/servant simulator tool than other simi
💻 JAVA
字号:
/**
 * 
 */
package com.corba.mnq.tool;

import java.io.File;
import java.util.logging.Level;
import java.util.logging.Logger;

public final class GetEtcTool {

	private static EtcProperties props;

	private static final String APPLICATION_DIRECTORY = "CorbaMNQ.dir";

	private static final String PROPERTIES_FILE = "CorbaMNQ.properties";

	/** used for java.util.logging */
	private static final Logger LOG = Logger.getLogger(GetEtcTool.class
			.getName());

	/**
	 * Get the properties from servant.properties file. Don't cache the values,
	 * as they could change.
	 * 
	 * @return an object of EtcProperties. Never <code>null</code>.
	 */
	public static synchronized EtcProperties getProperties() {
		if (props != null) {
			return props;
		}

		String dirName = System.getProperty(APPLICATION_DIRECTORY);
		if (dirName == null || dirName.length() <= 0) {
			LOG.severe("No value for System property '" + APPLICATION_DIRECTORY
					+ "', using current directory instead");
			dirName = ".";
		} else if (LOG.isLoggable(Level.CONFIG))
			LOG.config("System property '" + APPLICATION_DIRECTORY + "' is '"
					+ dirName + "'");
		String fPath = dirName + File.separator + "etc" + File.separator
				+ PROPERTIES_FILE;

		props = new EtcProperties(fPath);

		return props;
	}

	private GetEtcTool() {
		// Just to disallow creation of this object
	}

	/**
	 * Returns the logger object for use by
	 * {@link com.siemens.icm.nm.fw.logging.FFLoggable FFLoggable}.
	 * 
	 * @return the logger to use
	 */
	public Logger getLogger() {
		return LOG;
	}
}
/* EOF */

⌨️ 快捷键说明

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