Commit | Line | Data |
---|---|---|
8c8bf09f | 1 | /******************************************************************************* |
e31e01e8 | 2 | * Copyright (c) 2009, 2010 Ericsson |
8c8bf09f ASL |
3 | * |
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 | |
8 | * | |
9 | * Contributors: | |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.component; | |
14 | ||
8d2e2848 | 15 | import org.eclipse.linuxtools.tmf.signal.TmfSignal; |
8c8bf09f ASL |
16 | import org.eclipse.linuxtools.tmf.signal.TmfSignalManager; |
17 | ||
18 | /** | |
19 | * <b><u>TmfComponent</u></b> | |
20 | * <p> | |
e31e01e8 FC |
21 | * This is the base class of the TMF components. |
22 | * <p> | |
23 | * Currently, it only addresses the inter-component signaling. | |
8c8bf09f ASL |
24 | */ |
25 | public abstract class TmfComponent implements ITmfComponent { | |
26 | ||
e31e01e8 FC |
27 | // ------------------------------------------------------------------------ |
28 | // Constructor | |
29 | // ------------------------------------------------------------------------ | |
30 | ||
be9d96b7 | 31 | public TmfComponent() { |
e31e01e8 FC |
32 | register(); |
33 | } | |
34 | ||
35 | // ------------------------------------------------------------------------ | |
36 | // ITmfComponent | |
37 | // ------------------------------------------------------------------------ | |
38 | ||
39 | /* (non-Javadoc) | |
40 | * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#register() | |
41 | */ | |
42 | public void register() { | |
43 | TmfSignalManager.register(this); | |
8c8bf09f ASL |
44 | } |
45 | ||
e31e01e8 FC |
46 | /* (non-Javadoc) |
47 | * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#deregister() | |
48 | */ | |
49 | public void deregister() { | |
50 | TmfSignalManager.deregister(this); | |
8c8bf09f ASL |
51 | } |
52 | ||
e31e01e8 FC |
53 | /* (non-Javadoc) |
54 | * @see org.eclipse.linuxtools.tmf.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.signal.TmfSignal) | |
55 | */ | |
56 | public void broadcast(TmfSignal signal) { | |
8d2e2848 FC |
57 | TmfSignalManager.dispatchSignal(signal); |
58 | } | |
e31e01e8 | 59 | |
8c8bf09f | 60 | } |