本文整理汇总了Java中org.fosstrak.ale.client.cfg.Configuration类的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Configuration类属于org.fosstrak.ale.client.cfg包,在下文中一共展示了Configuration类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.fosstrak.ale.client.cfg.Configuration; //导入依赖的package包/类
/**
* @param args command line arguments.
*/
public static void main(String[] args) throws FosstrakAleClientException {
for (String arg : args) {
if ("help".equalsIgnoreCase(arg)) help();
if ("-h".equalsIgnoreCase(arg)) help();
if ("--help".equalsIgnoreCase(arg)) help();
}
// configure Logger with properties file
try {
Properties p = new Properties();
p.load(FosstrakAleClient.class.getResourceAsStream("/log4j.properties"));
PropertyConfigurator.configure(p);
s_log.debug("configured the logger.");
} catch (Exception e) {
s_log.info("Could not configure the logger.");
}
s_log.debug("preparing client for execution.");
FosstrakAleClient.instance().configure(Configuration.getConfiguration(args));
s_log.debug("executing client.");
FosstrakAleClient.instance().execute();
}
示例2: getConfiguration
import org.fosstrak.ale.client.cfg.Configuration; //导入依赖的package包/类
/**
* @return a handle to the configuration.
*/
public final Configuration getConfiguration() {
return m_configuration;
}
示例3: configure
import org.fosstrak.ale.client.cfg.Configuration; //导入依赖的package包/类
/**
* allows to configure the client.
* @param cfg the configuration object.
* @throws FosstrakAleClientException upon error in startup procedure.
*/
public void configure(Configuration cfg) throws FosstrakAleClientException {
m_configuration = cfg;
}