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
.core
.component
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignal
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalManager
;
19 * This is the base class of the TMF components.
21 * Currently, it only addresses the inter-component signaling.
24 * @author Francois Chouinard
26 public abstract class TmfComponent
implements ITmfComponent
{
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
39 * Default constructor. To be used in conjunction with init()
41 public TmfComponent() {
42 this(""); //$NON-NLS-1$
46 * Perform component initialization and register it as a signal listener.
47 * Need to be called when the default constructor was used.
49 * @param name the component name
51 public void init(String name
) {
53 TmfSignalManager
.register(this);
57 * The standard constructor
59 * @param name the component name
61 public TmfComponent(String name
) {
66 * The copy constructor
68 * @param other the other component
70 public TmfComponent(TmfComponent other
) {
74 // ------------------------------------------------------------------------
76 // ------------------------------------------------------------------------
79 * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#getName()
82 public String
getName() {
87 * @param name the new component name
89 protected void setName(String name
) {
93 // ------------------------------------------------------------------------
95 // ------------------------------------------------------------------------
98 * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#dispose()
101 public void dispose() {
102 TmfSignalManager
.deregister(this);
103 // if (Tracer.isComponentTraced()) Tracer.traceComponent(this, "terminated");
107 * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.core.signal.TmfSignal)
110 public void broadcast(TmfSignal signal
) {
111 TmfSignalManager
.dispatchSignal(signal
);
This page took 0.034068 seconds and 6 git commands to generate.