1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.component
;
15 import org
.eclipse
.linuxtools
.tmf
.signal
.TmfSignal
;
16 import org
.eclipse
.linuxtools
.tmf
.signal
.TmfSignalManager
;
19 * <b><u>TmfComponent</u></b>
21 * This is the base class of the TMF components.
23 * Currently, it only addresses the inter-component signaling.
25 public abstract class TmfComponent
implements ITmfComponent
{
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
33 public TmfComponent(String name
) {
35 // if (Tracer.isComponentTraced()) Tracer.traceComponent(this, "created");
36 TmfSignalManager
.register(this);
39 public TmfComponent(TmfComponent oldComponent
) {
40 this.fName
= oldComponent
.fName
;
42 // Should we register? Probably not but I'm not quite sure what this does
47 * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#getName()
49 protected void setName(String name
) {
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
58 * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#getName()
61 public String
getName() {
66 * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#dispose()
69 public void dispose() {
70 TmfSignalManager
.deregister(this);
71 // if (Tracer.isComponentTraced()) Tracer.traceComponent(this, "terminated");
75 * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.signal.TmfSignal)
78 public void broadcast(TmfSignal signal
) {
79 TmfSignalManager
.dispatchSignal(signal
);