| 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2009 Ericsson |
| 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 | |
| 15 | import org.eclipse.linuxtools.tmf.signal.TmfSignal; |
| 16 | import org.eclipse.linuxtools.tmf.signal.TmfSignalManager; |
| 17 | |
| 18 | /** |
| 19 | * <b><u>TmfComponent</u></b> |
| 20 | * <p> |
| 21 | */ |
| 22 | public abstract class TmfComponent implements ITmfComponent { |
| 23 | |
| 24 | public TmfComponent() { |
| 25 | TmfSignalManager.addListener(this); |
| 26 | } |
| 27 | |
| 28 | public void dispose() { |
| 29 | TmfSignalManager.removeListener(this); |
| 30 | } |
| 31 | |
| 32 | public void broadcastSignal(TmfSignal signal) { |
| 33 | TmfSignalManager.dispatchSignal(signal); |
| 34 | } |
| 35 | } |