Commit | Line | Data |
---|---|---|
8c8bf09f ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009 Ericsson | |
6256d8ad | 3 | * |
8c8bf09f ASL |
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 | |
6256d8ad | 8 | * |
8c8bf09f ASL |
9 | * Contributors: |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
6c13869b | 13 | package org.eclipse.linuxtools.tmf.core.signal; |
8c8bf09f | 14 | |
6c13869b FC |
15 | import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; |
16 | import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; | |
8c8bf09f ASL |
17 | |
18 | /** | |
faa38350 PT |
19 | * Signal indicating a trace has been updated. |
20 | * | |
21 | * The trace has been indexed up to the specified range. | |
6256d8ad | 22 | * |
4b7b3670 FC |
23 | * @version 1.0 |
24 | * @author Francois Chouinard | |
8c8bf09f ASL |
25 | */ |
26 | public class TmfTraceUpdatedSignal extends TmfSignal { | |
27 | ||
6256d8ad | 28 | private final ITmfTrace fTrace; |
4f8ca6a1 AM |
29 | private final TmfTimeRange fTimeRange; |
30 | ||
31 | /** | |
32 | * Constructor | |
33 | * | |
34 | * @param source | |
35 | * Object sending this signal | |
36 | * @param trace | |
37 | * The trace that was updated | |
38 | * @param range | |
39 | * The new time range of the trace | |
40 | */ | |
6256d8ad | 41 | public TmfTraceUpdatedSignal(Object source, ITmfTrace trace, TmfTimeRange range) { |
4f8ca6a1 AM |
42 | super(source); |
43 | fTrace = trace; | |
44 | fTimeRange = range; | |
45 | } | |
46 | ||
47 | /** | |
48 | * @return The trace referred to by this signal | |
49 | */ | |
6256d8ad | 50 | public ITmfTrace getTrace() { |
4f8ca6a1 AM |
51 | return fTrace; |
52 | } | |
53 | ||
54 | /** | |
55 | * @return The time range indicated by this signal | |
56 | */ | |
57 | public TmfTimeRange getRange() { | |
58 | return fTimeRange; | |
59 | } | |
60 | ||
61 | /* | |
62 | * (non-Javadoc) | |
63 | * | |
64 | * @see java.lang.Object#toString() | |
65 | */ | |
66 | @Override | |
3b38ea61 | 67 | @SuppressWarnings("nls") |
4f8ca6a1 AM |
68 | public String toString() { |
69 | return "[TmfTraceUpdatedSignal (" + fTrace.toString() + ", " | |
70 | + fTimeRange.toString() + ")]"; | |
71 | } | |
8c8bf09f ASL |
72 | |
73 | } |