当前位置: 首页>>代码示例>>Java>>正文


Java FosstrakAleClientException类代码示例

本文整理汇总了Java中org.fosstrak.ale.client.exception.FosstrakAleClientException的典型用法代码示例。如果您正苦于以下问题:Java FosstrakAleClientException类的具体用法?Java FosstrakAleClientException怎么用?Java FosstrakAleClientException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FosstrakAleClientException类属于org.fosstrak.ale.client.exception包,在下文中一共展示了FosstrakAleClientException类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Configuration

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * construct a new configuration. if the command line provides a 
 * configuration file, then this file is used. otherwise the default 
 * property from the jar is used. 
 * @param cmdLine the command line array.
 * @throws FosstrakAleClientException when the configuration could not be obtained.
 */
private Configuration(String[] cmdLine) throws FosstrakAleClientException {
	
	String file = PROPERTIES_FILE_LOCATION;
	if (cmdLine.length > 0) file = cmdLine[0];
	
	s_log.info(String.format("using configuration file '%s'", file));
	
	// load properties
	InputStream inputStream = this.getClass().getResourceAsStream(file);
	try {
		m_properties = new Properties();
		m_properties.load(inputStream);
	} catch (Exception e) {
		m_properties = null;
		s_log.error(String.format("could not load configuration file '%s'", file));
		throw new FosstrakAleClientException(e);
	}
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:26,代码来源:Configuration.java

示例2: getProxy

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * @return the proxy object. if null, display the connect dialog.
 */
protected Object getProxy() throws FosstrakAleClientException {
	if (null == m_proxy) {
		// display the connect dialog
		String address = FosstrakAleClient.instance().showConnectDialog(m_endpointKey);
		
		// create the proxy object.
		JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
		factory.setServiceClass(m_clzz);
		factory.setAddress(address);
		m_proxy = factory.create();
		
		// we try to perform a test method call.
		// if that call fails, we assume the connection to be daad.
		try {
			m_testMethod.invoke(m_proxy, m_testMethodParameter);
		} catch (Exception e) {
			m_proxy = null;
			throw new FosstrakAleClientServiceDownException(e);
		}
	}
	return m_proxy;
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:26,代码来源:AbstractTab.java

示例3: main

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的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();
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:26,代码来源:FosstrakAleClient.java

示例4: initialize

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * This method initializes the class, by loading properties and texts.
 * 
 * @throws FosstrakAleClientException when the language files could not be loaded.
 */
public void initialize() throws FosstrakAleClientException {
	
	String baseNameKey = getBaseNameKey();
	
	try {
		// get the base name (eg /props/ALEClient
		String baseName = FosstrakAleClient.instance().getConfiguration().getProperty(baseNameKey);
	
		// load text
		InputStream languageStream = null;
		
		// try to get language form property file
		String language = FosstrakAleClient.instance().getConfiguration().getLanguage();
		if (null != language) {
			languageStream = this.getClass().getResourceAsStream(String.format("%s_%s.lang", baseName, language));
		}
		
		// try system default language
		if (languageStream == null) {
			languageStream = this.getClass().getResourceAsStream(String.format("%s_%s.lang", baseName, SYSTEM_DEFAULT_LOCALE.getLanguage()));
		}
		
		// try default language
		if (languageStream == null) {
			languageStream = this.getClass().getResourceAsStream(String.format("%s_%s.lang", baseName, DEFAULT_LOCALE.getLanguage()));
		}
		
		if (languageStream == null) {
			throw new IllegalArgumentException("Could not load language package from classpath (" + DEFAULT_LOCALE + ")");
		}
		m_guiText = new PropertyResourceBundle(languageStream);        
		initializeGUI();
	} catch (Exception e) {
		throw new FosstrakAleClientException(e);
	}
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:42,代码来源:AbstractTab.java

示例5: instance

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * @return handle to the singleton of the ale client.
 */
public static FosstrakAleClient instance() {
	if (null == s_instance) {
		try {
			s_instance = new FosstrakAleClient();
		} catch (FosstrakAleClientException e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}
	
	return s_instance;
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:16,代码来源:FosstrakAleClient.java

示例6: execute

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * starts up the sink.
 * @param url the url of the event sink.
 * @throws FosstrakAleClientException upon error in startup procedure.
 */
public void execute(URL url) throws FosstrakAleClientException {
	EventSink sink = new EventSink(url.toString());
	add(sink);		
	setSize(FosstrakAleClient.instance().getConfiguration().getWindowSize());
	setResizable(true);
       setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       setVisible(true);
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:14,代码来源:FosstrakEventSinkStandalone.java

示例7: getAleServiceProxy

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * @return returns the proxy object already casted.
 */
protected ALEServicePortType getAleServiceProxy() throws FosstrakAleClientException {
	return (ALEServicePortType) getProxy();
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:7,代码来源:ALEClient.java

示例8: getAleLRServiceProxy

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * @return returns the proxy object already casted.
 */
protected ALELRServicePortType getAleLRServiceProxy() throws FosstrakAleClientException {
	return (ALELRServicePortType) getProxy();
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:7,代码来源:ALELRClient.java

示例9: getAleServiceProxy

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * @return returns the proxy object already casted.
 */
protected ALECCServicePortType getAleServiceProxy() throws FosstrakAleClientException {
	return (ALECCServicePortType) getProxy();
}
 
开发者ID:gs1oliot,项目名称:oliot-fc,代码行数:7,代码来源:ALECCClient.java

示例10: getAletmServiceProxy

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * @return returns the proxy object already casted.
 */
protected ALETMServicePortType getAletmServiceProxy() throws FosstrakAleClientException {
	
	return (ALETMServicePortType) getProxy();
}
 
开发者ID:gs1oliot,项目名称:oliot-fc,代码行数:8,代码来源:ALETMClient.java

示例11: getConfiguration

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * reads the configuration from a configuration given by the command line.
 * @param cmdLine the command line arguments.
 * @return a configuration
 * @throws FosstrakAleClientException when the configuration could not be obtained.
 */
public static Configuration getConfiguration(String[] cmdLine) throws FosstrakAleClientException {
	return new Configuration(cmdLine);
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:10,代码来源:Configuration.java

示例12: getConfigurtionDefaultConfig

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * reads the default configuration file
 * @return a configuration
 * @throws FosstrakAleClientException when the configuration could not be obtained.
 */
public static Configuration getConfigurtionDefaultConfig() throws FosstrakAleClientException {
	return getConfiguration(new String[] {} );
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:9,代码来源:Configuration.java

示例13: configure

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的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;
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:9,代码来源:FosstrakAleClient.java

示例14: FosstrakAleClient

import org.fosstrak.ale.client.exception.FosstrakAleClientException; //导入依赖的package包/类
/**
 * private constructor for the singleton.
 * @throws FosstrakAleClientException upon start problems.
 */
private FosstrakAleClient() throws FosstrakAleClientException {
	
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:8,代码来源:FosstrakAleClient.java


注:本文中的org.fosstrak.ale.client.exception.FosstrakAleClientException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。