1 /*******************************************************************************
2 * Copyright (c) 2009, 2012 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
.internal
.tmf
.core
.TmfCoreTracer
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignal
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfSignalManager
;
20 * This is the base class of the TMF components.
22 * Currently, it only addresses the inter-component signaling.
25 * @author Francois Chouinard
27 public abstract class TmfComponent
implements ITmfComponent
{
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
35 // ------------------------------------------------------------------------
37 // ------------------------------------------------------------------------
40 * Default constructor. To be used in conjunction with init()
42 public TmfComponent() {
43 this(""); //$NON-NLS-1$
47 * Perform component initialization and register it as a signal listener.
48 * Need to be called when the default constructor was used.
50 * @param name the component name
52 public void init(String name
) {
53 TmfCoreTracer
.traceComponent(this, "created"); //$NON-NLS-1$
55 TmfSignalManager
.register(this);
59 * The standard constructor
61 * @param name the component name
63 public TmfComponent(String name
) {
68 * The copy constructor
70 * @param other the other component
72 public TmfComponent(TmfComponent other
) {
76 // ------------------------------------------------------------------------
78 // ------------------------------------------------------------------------
81 * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#getName()
84 public String
getName() {
89 * @param name the new component name
91 protected void setName(String name
) {
95 // ------------------------------------------------------------------------
97 // ------------------------------------------------------------------------
100 * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#dispose()
103 public void dispose() {
104 TmfSignalManager
.deregister(this);
105 TmfCoreTracer
.traceComponent(this, "disposed"); //$NON-NLS-1$
109 * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.core.signal.TmfSignal)
112 public void broadcast(TmfSignal signal
) {
113 TmfSignalManager
.dispatchSignal(signal
);
This page took 0.032981 seconds and 5 git commands to generate.