Commit | Line | Data |
---|---|---|
faa38350 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2012, 2014 Ericsson |
faa38350 PT |
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 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.core.signal; |
faa38350 | 14 | |
2bdf0193 AM |
15 | import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; |
16 | import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; | |
faa38350 PT |
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 | * | |
faa38350 | 24 | * @author Patrick Tasse |
faa38350 PT |
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 | ||
faa38350 PT |
61 | @Override |
62 | @SuppressWarnings("nls") | |
63 | public String toString() { | |
64 | return "[TmfTraceRangeUpdatedSignal (" + fTrace.getName() + ", " + fTimeRange.toString() + ")]"; | |
65 | } | |
66 | ||
67 | } |