~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfSignalTracer.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.core.signal;
 
14
 
 
15
/**
 
16
 * This object (singleton) traces all TmfSignals in the application.
 
17
 * 
 
18
 * @version 1.0
 
19
 * @author Francois Chouinard
 
20
 */
 
21
public class TmfSignalTracer {
 
22
 
 
23
        static TmfSignalTracer fInstance;
 
24
 
 
25
        static public TmfSignalTracer getInstance() {
 
26
                if (fInstance == null) {
 
27
                        fInstance = new TmfSignalTracer();
 
28
                }
 
29
                return fInstance;
 
30
        }
 
31
 
 
32
        private TmfSignalTracer() {
 
33
        }
 
34
 
 
35
        @TmfSignalHandler
 
36
        public void traceSignal(TmfSignal signal) {
 
37
                System.out.println(signal.getSource().toString() + ": " + signal.toString()); //$NON-NLS-1$
 
38
        }
 
39
}