tmf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / signal / TmfTraceRangeUpdatedSignal.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.tracecompass.tmf.core.timestamp.TmfTimeRange;
16 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
17
18 /**
19 * Signal indicating a trace range has been updated.
20 *
21 * Receivers can safely perform event requests for the specified time range.
22 * The signal acts as a trigger for coalescing such requests.
23 *
24 * @author Patrick Tasse
25 */
26 public class TmfTraceRangeUpdatedSignal extends TmfSignal {
27
28 private final ITmfTrace fTrace;
29 private final TmfTimeRange fTimeRange;
30
31 /**
32 * Constructor
33 *
34 * @param source
35 * Object sending this signal
36 * @param trace
37 * Trace whose range was updated
38 * @param range
39 * The new time range of the trace
40 */
41 public TmfTraceRangeUpdatedSignal(Object source, ITmfTrace trace, TmfTimeRange range) {
42 super(source);
43 fTrace = trace;
44 fTimeRange = range;
45 }
46
47 /**
48 * @return The trace
49 */
50 public ITmfTrace getTrace() {
51 return fTrace;
52 }
53
54 /**
55 * @return The time range
56 */
57 public TmfTimeRange getRange() {
58 return fTimeRange;
59 }
60
61 @Override
62 @SuppressWarnings("nls")
63 public String toString() {
64 return "[TmfTraceRangeUpdatedSignal (" + fTrace.getName() + ", " + fTimeRange.toString() + ")]";
65 }
66
67 }
This page took 0.047417 seconds and 5 git commands to generate.