Commit | Line | Data |
---|---|---|
f152ca57 FC |
1 | /******************************************************************************* |
2 | * Copyright (c) 2012 Ericsson | |
6256d8ad | 3 | * |
f152ca57 FC |
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 | * |
f152ca57 FC |
9 | * Contributors: |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.core.signal; | |
14 | ||
15 | import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; | |
16 | ||
17 | /** | |
18 | * Signal sent when the state system has completed its build. | |
6256d8ad | 19 | * |
f152ca57 FC |
20 | * @version 1.0 |
21 | * @author Francois Chouinard | |
22 | */ | |
23 | public class TmfStateSystemBuildCompleted extends TmfSignal { | |
24 | ||
6256d8ad | 25 | private final ITmfTrace fTrace; |
a76f1067 | 26 | private final String fID; |
6256d8ad | 27 | |
f152ca57 | 28 | /** |
4f8ca6a1 AM |
29 | * Constructor |
30 | * | |
f152ca57 | 31 | * @param source |
4f8ca6a1 AM |
32 | * Object sending this signal |
33 | * @param trace | |
34 | * The state system of which trace just finished building | |
a76f1067 AM |
35 | * @param id |
36 | * ID associated with this state system. This can be used in the | |
37 | * case of a trace containing multiple state systems, to | |
38 | * differentiate between them. | |
39 | * @since 2.0 | |
f152ca57 | 40 | */ |
a76f1067 | 41 | public TmfStateSystemBuildCompleted(Object source, ITmfTrace trace, String id) { |
f152ca57 FC |
42 | super(source); |
43 | fTrace = trace; | |
a76f1067 | 44 | fID = id; |
f152ca57 FC |
45 | } |
46 | ||
47 | /** | |
4f8ca6a1 | 48 | * @return The trace referred to by this signal |
f152ca57 | 49 | */ |
6256d8ad | 50 | public ITmfTrace getTrace() { |
f152ca57 FC |
51 | return fTrace; |
52 | } | |
53 | ||
a76f1067 AM |
54 | /** |
55 | * @return The ID of the state system that just finished building | |
56 | * @since 2.0 | |
57 | */ | |
58 | public String getID() { | |
59 | return fID; | |
60 | } | |
61 | ||
f152ca57 FC |
62 | /* (non-Javadoc) |
63 | * @see java.lang.Object#toString() | |
64 | */ | |
65 | @Override | |
f152ca57 | 66 | public String toString() { |
a76f1067 AM |
67 | return "[TmfStateSystemBuildCompleted (trace = " + fTrace.toString() + //$NON-NLS-1$ |
68 | ", ID = " + fID + ")]"; //$NON-NLS-1$ //$NON-NLS-2$ | |
f152ca57 FC |
69 | } |
70 | ||
71 | } |