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


Java FosstrakAleClient类代码示例

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

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

示例1: getProxy

import org.fosstrak.ale.client.FosstrakAleClient; //导入依赖的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


示例2: decodeResult

import org.fosstrak.ale.client.FosstrakAleClient; //导入依赖的package包/类
@Override
protected void decodeResult(StringBuffer sb, Object result) {
	if (result instanceof ArrayOfString) {
		ArrayOfString resultStringArray = (ArrayOfString)result;
		if (resultStringArray.getString().size() == 0) {
			sb.append(m_guiText.getString("EmptyArray"));
		} else {
			for (String s : resultStringArray.getString()) {
				sb.append(s);
				sb.append("\n");
			}
		}
	} else if (result instanceof LRSpec) {
		CharArrayWriter writer = new CharArrayWriter();
		try {
			SerializerUtil.serializeLRSpec((LRSpec)result, writer);
		} catch (Exception e) {
			FosstrakAleClient.instance().showExceptionDialog(m_guiText.getString("SerializationExceptionMessage"));
		}
		sb.append(writer.toString());
	}
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:23,代码来源:ALELRClient.java


示例3: AbstractTab

import org.fosstrak.ale.client.FosstrakAleClient; //导入依赖的package包/类
/**
 * 
 * @param clzz the class of the proxy stub.
 * @param endpointKey key to the endpoint in the properties.
 * @param parent the parent frame.
 */
public AbstractTab(Class<?> clzz, String endpointKey, JFrame parent, Method testMethod, Object testMethodParameter) {
	m_clzz = clzz;
	m_endpointKey = endpointKey;
	m_parent = parent;
	m_testMethod = testMethod;
	m_testMethodParameter = testMethodParameter;
	
	m_font = FosstrakAleClient.instance().getConfiguration().getFont();
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:16,代码来源:AbstractTab.java


示例4: initialize

import org.fosstrak.ale.client.FosstrakAleClient; //导入依赖的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: createEventSink

import org.fosstrak.ale.client.FosstrakAleClient; //导入依赖的package包/类
/**
 * creates an event sink from a given url.
 * @param text
 */
private void createEventSink(String eventSinkURL) {
	try {
		EventSink sink = new EventSink(eventSinkURL);
		FosstrakAleClient.instance().addTab(eventSinkURL, sink);
	} catch (Exception e) {
		s_log.error("Could not start requested event sink.");
		e.printStackTrace();
	}
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:14,代码来源:ALEClient.java


示例6: quitSink

import org.fosstrak.ale.client.FosstrakAleClient; //导入依赖的package包/类
/**
 * stop the event sink.
 */
public void quitSink()
{
	m_reportHandler.stop();
	
	if (m_standalone)
	{
		System.exit(0);
	}
	else
	{
		FosstrakAleClient.instance().removeTab(this);
	}
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:17,代码来源:EventSink.java



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