FileDocCategorySizeDatePackage
ConfigListener.javaAPI DocAzureus 3.0.3.42378Tue Aug 07 13:36:52 BST 2007com.aelitis.azureus.ui.swt.browser.listener

ConfigListener

public class ConfigListener extends com.aelitis.azureus.ui.swt.browser.msg.AbstractMessageListener
author
TuxPaper
created
Mar 30, 2007

Fields Summary
private static final String
DEFAULT_LISTENER_ID
public static final String
OP_GET_VERSION
private org.eclipse.swt.browser.Browser
browser
Constructors Summary
public ConfigListener(String id, org.eclipse.swt.browser.Browser browser)


	     
		super(id);
		this.browser = browser;
	
public ConfigListener(org.eclipse.swt.browser.Browser browser)

		this(DEFAULT_LISTENER_ID, browser);
	
Methods Summary
public voidhandleMessage(com.aelitis.azureus.ui.swt.browser.msg.BrowserMessage message)

		try {
			String opid = message.getOperationId();

			if (OP_GET_VERSION.equals(opid)) {
				Map decodedMap = message.getDecodedMap();
				String callback = MapUtils.getMapString(decodedMap, "callback", null);
				if (callback != null && browser != null) {
					browser.execute(callback + "('" + Constants.AZUREUS_VERSION + "')");
				} else {
					message.debug("bad or no callback param");
				}
			}
		} catch (Throwable t) {
			message.debug("handle Config message", t);
		}