本文整理汇总了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;
}
示例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());
}
}
示例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();
}
示例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);
}
}
示例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();
}
}
示例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);
}
}