Move alltests plugin to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / linuxtools / tmf / core / signal / TmfTraceClosedSignal.java
1 /*******************************************************************************
2 * Copyright (c) 2012 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 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.signal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
17
18 /**
19 * Signal indicating a trace is being closed.
20 *
21 * Receivers should cancel any jobs, threads or requests for the specified trace
22 * and clear any user interface component related to it as soon as possible.
23 * The trace will be disposed after the signal has been processed.
24 *
25 * @version 1.0
26 * @author Patrick Tasse
27 * @since 2.0
28 */
29 @NonNullByDefault
30 public class TmfTraceClosedSignal extends TmfSignal {
31
32 private final ITmfTrace fTrace;
33
34 /**
35 * Constructor for a new signal
36 *
37 * @param source
38 * The object sending this signal
39 * @param trace
40 * The trace being closed
41 */
42 public TmfTraceClosedSignal(Object source, ITmfTrace trace) {
43 super(source);
44 fTrace = trace;
45 }
46
47 /**
48 * Get a reference to the trace being closed
49 *
50 * @return The trace object
51 */
52 public ITmfTrace getTrace() {
53 return fTrace;
54 }
55
56 @Override
57 public String toString() {
58 return "[TmfTraceClosedSignal (" + fTrace.getName() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$
59 }
60 }
This page took 0.030908 seconds and 5 git commands to generate.