FileDocCategorySizeDatePackage
ClientMessageContextImpl.javaAPI DocAzureus 3.0.3.43225Thu Mar 01 23:47:30 GMT 2007com.aelitis.azureus.core.messenger

ClientMessageContextImpl

public abstract class ClientMessageContextImpl extends Object implements ClientMessageContext
author
TuxPaper
created
Oct 9, 2006

Fields Summary
private String
id
private com.aelitis.azureus.ui.swt.browser.msg.MessageDispatcher
dispatcher
private com.aelitis.azureus.ui.swt.browser.txn.TransactionManager
txnManager
Constructors Summary
public ClientMessageContextImpl(String id)

		this.id = id;
		this.dispatcher = new MessageDispatcher(this);
		this.txnManager = new TransactionManager(this);
	
Methods Summary
public voidaddMessageListener(com.aelitis.azureus.ui.swt.browser.msg.MessageListener listener)

		dispatcher.addListener(listener);
	
public com.aelitis.azureus.ui.swt.browser.txn.TransactioncancelTransaction(java.lang.String type)

		return txnManager.cancelTransaction(type);
	
public voiddebug(java.lang.String message)

		AEDiagnosticsLogger diag_logger = AEDiagnostics.getLogger("v3.CMsgr");
		diag_logger.log("[" + id + "] " + message);
		if (Constants.DIAG_TO_STDOUT) {
			System.out.println("[" + id + "] " + message);
		}
	
public voiddebug(java.lang.String message, java.lang.Throwable t)

		AEDiagnosticsLogger diag_logger = AEDiagnostics.getLogger("v3.CMsgr");
		diag_logger.log("[" + id + "] " + message);
		diag_logger.log(t);
		if (Constants.DIAG_TO_STDOUT) {
			System.err.println("[" + id + "] " + message);
			t.printStackTrace();
		}
	
public java.lang.StringgetID()

		return id;
	
public com.aelitis.azureus.ui.swt.browser.msg.MessageDispatchergetMessageDispatcher()

		return dispatcher;
	
public com.aelitis.azureus.ui.swt.browser.txn.TransactiongetTransaction(java.lang.String type)

		return txnManager.getTransaction(type);
	
public com.aelitis.azureus.ui.swt.browser.txn.TransactionManagergetTransactionManager()

		return txnManager;
	
public voidregisterTransactionType(java.lang.String type, java.lang.Class clazz)

		txnManager.registerTransactionType(type, clazz);
	
public voidremoveMessageListener(com.aelitis.azureus.ui.swt.browser.msg.MessageListener listener)

		dispatcher.removeListener(listener);
	
public voidremoveMessageListener(java.lang.String listenerId)

		dispatcher.removeListener(listenerId);
	
public com.aelitis.azureus.ui.swt.browser.txn.TransactionstartTransaction(java.lang.String type)

		return txnManager.startTransaction(type);