Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTraceClosedSignal.java')
-rw-r--r--tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTraceClosedSignal.java58
1 files changed, 58 insertions, 0 deletions
diff --git a/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTraceClosedSignal.java b/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTraceClosedSignal.java
new file mode 100644
index 0000000000..2fee72d46a
--- /dev/null
+++ b/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/signal/TmfTraceClosedSignal.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tasse - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.core.signal;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+
+/**
+ * Signal indicating a trace is being closed.
+ *
+ * Receivers should cancel any jobs, threads or requests for the specified trace
+ * and clear any user interface component related to it as soon as possible.
+ * The trace will be disposed after the signal has been processed.
+ *
+ * @author Patrick Tasse
+ */
+@NonNullByDefault
+public class TmfTraceClosedSignal extends TmfSignal {
+
+ private final ITmfTrace fTrace;
+
+ /**
+ * Constructor for a new signal
+ *
+ * @param source
+ * The object sending this signal
+ * @param trace
+ * The trace being closed
+ */
+ public TmfTraceClosedSignal(Object source, ITmfTrace trace) {
+ super(source);
+ fTrace = trace;
+ }
+
+ /**
+ * Get a reference to the trace being closed
+ *
+ * @return The trace object
+ */
+ public ITmfTrace getTrace() {
+ return fTrace;
+ }
+
+ @Override
+ public String toString() {
+ return "[TmfTraceClosedSignal (" + fTrace.getName() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}

Back to the top