X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=org.eclipse.linuxtools.tmf%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Ftmf%2Fcomponent%2FTmfComponent.java;h=fbedd776f16e19aaeb124df7486109e50e00d156;hb=e31e01e80839acbe43fc68438d5252daf2644752;hp=eefb3248ec881e699652f8c3959fd9ce72f23943;hpb=be9d96b7e3c94308373305d6878787e330c06f95;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.tmf/src/org/eclipse/linuxtools/tmf/component/TmfComponent.java b/org.eclipse.linuxtools.tmf/src/org/eclipse/linuxtools/tmf/component/TmfComponent.java index eefb3248ec..fbedd776f1 100644 --- a/org.eclipse.linuxtools.tmf/src/org/eclipse/linuxtools/tmf/component/TmfComponent.java +++ b/org.eclipse.linuxtools.tmf/src/org/eclipse/linuxtools/tmf/component/TmfComponent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 Ericsson + * Copyright (c) 2009, 2010 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -12,21 +12,49 @@ package org.eclipse.linuxtools.tmf.component; +import org.eclipse.linuxtools.tmf.signal.TmfSignal; import org.eclipse.linuxtools.tmf.signal.TmfSignalManager; /** * TmfComponent *

- * TODO: Implement me. Please. + * This is the base class of the TMF components. + *

+ * Currently, it only addresses the inter-component signaling. */ public abstract class TmfComponent implements ITmfComponent { + // ------------------------------------------------------------------------ + // Constructor + // ------------------------------------------------------------------------ + public TmfComponent() { - TmfSignalManager.addListener(this); + register(); + } + + // ------------------------------------------------------------------------ + // ITmfComponent + // ------------------------------------------------------------------------ + + /* (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#register() + */ + public void register() { + TmfSignalManager.register(this); + } + + /* (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#deregister() + */ + public void deregister() { + TmfSignalManager.deregister(this); } - public void dispose() { - TmfSignalManager.removeListener(this); + /* (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.signal.TmfSignal) + */ + public void broadcast(TmfSignal signal) { + TmfSignalManager.dispatchSignal(signal); } }