Commit | Line | Data |
---|---|---|
faa38350 | 1 | /******************************************************************************* |
61759503 | 2 | * Copyright (c) 2012, 2013 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 | ||
13 | package org.eclipse.linuxtools.tmf.core.signal; | |
14 | ||
3bd46eef | 15 | import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange; |
faa38350 PT |
16 | import org.eclipse.linuxtools.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 | * @version 1.0 | |
25 | * @author Patrick Tasse | |
26 | * @since 2.0 | |
27 | */ | |
28 | public class TmfTraceRangeUpdatedSignal extends TmfSignal { | |
29 | ||
30 | private final ITmfTrace fTrace; | |
31 | private final TmfTimeRange fTimeRange; | |
32 | ||
33 | /** | |
34 | * Constructor | |
35 | * | |
36 | * @param source | |
37 | * Object sending this signal | |
38 | * @param trace | |
39 | * Trace whose range was updated | |
40 | * @param range | |
41 | * The new time range of the trace | |
42 | */ | |
43 | public TmfTraceRangeUpdatedSignal(Object source, ITmfTrace trace, TmfTimeRange range) { | |
44 | super(source); | |
45 | fTrace = trace; | |
46 | fTimeRange = range; | |
47 | } | |
48 | ||
49 | /** | |
50 | * @return The trace | |
51 | */ | |
52 | public ITmfTrace getTrace() { | |
53 | return fTrace; | |
54 | } | |
55 | ||
56 | /** | |
57 | * @return The time range | |
58 | */ | |
59 | public TmfTimeRange getRange() { | |
60 | return fTimeRange; | |
61 | } | |
62 | ||
faa38350 PT |
63 | @Override |
64 | @SuppressWarnings("nls") | |
65 | public String toString() { | |
66 | return "[TmfTraceRangeUpdatedSignal (" + fTrace.getName() + ", " + fTimeRange.toString() + ")]"; | |
67 | } | |
68 | ||
69 | } |