tmf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / signal / TmfTraceClosedSignal.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2014 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.tracecompass.tmf.core.signal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.tracecompass.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 * @author Patrick Tasse
26 */
27 @NonNullByDefault
28 public class TmfTraceClosedSignal extends TmfSignal {
29
30 private final ITmfTrace fTrace;
31
32 /**
33 * Constructor for a new signal
34 *
35 * @param source
36 * The object sending this signal
37 * @param trace
38 * The trace being closed
39 */
40 public TmfTraceClosedSignal(Object source, ITmfTrace trace) {
41 super(source);
42 fTrace = trace;
43 }
44
45 /**
46 * Get a reference to the trace being closed
47 *
48 * @return The trace object
49 */
50 public ITmfTrace getTrace() {
51 return fTrace;
52 }
53
54 @Override
55 public String toString() {
56 return "[TmfTraceClosedSignal (" + fTrace.getName() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$
57 }
58 }
This page took 0.049768 seconds and 5 git commands to generate.