Commit | Line | Data |
---|---|---|
8c8bf09f ASL |
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.signal; | |
14 | ||
15 | /** | |
16 | * <b><u>TmfSignalTracer</u></b> | |
17 | * <p> | |
18 | * This object (singleton) traces all TmfSignals in the application. | |
19 | */ | |
20 | public class TmfSignalTracer { | |
21 | ||
22 | static TmfSignalTracer fInstance; | |
23 | ||
24 | static public TmfSignalTracer getInstance() { | |
25 | if (fInstance == null) { | |
26 | fInstance = new TmfSignalTracer(); | |
27 | } | |
28 | return fInstance; | |
29 | } | |
30 | ||
31 | private TmfSignalTracer() { | |
32 | } | |
33 | ||
34 | @TmfSignalHandler | |
35 | public void traceSignal(TmfSignal signal) { | |
3b38ea61 | 36 | System.out.println(signal.getSource().toString() + ": " + signal.toString()); //$NON-NLS-1$ |
8c8bf09f ASL |
37 | } |
38 | } |