Commit | Line | Data |
---|---|---|
73005152 | 1 | /********************************************************************** |
df0b8ff4 | 2 | * Copyright (c) 2011, 2012 Ericsson |
c8422608 | 3 | * |
73005152 BH |
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 | |
c8422608 AM |
8 | * |
9 | * Contributors: | |
73005152 BH |
10 | * Bernd Hufmann - Initial API and implementation |
11 | **********************************************************************/ | |
c8422608 | 12 | |
df0b8ff4 BH |
13 | package org.eclipse.linuxtools.tmf.ui.views.uml2sd.loader; |
14 | ||
15 | import org.eclipse.linuxtools.tmf.core.uml2sd.ITmfAsyncSequenceDiagramEvent; | |
16 | import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage; | |
73005152 BH |
17 | |
18 | /** | |
73005152 BH |
19 | * <p> |
20 | * Extends AsyncMessage class to provide additional information about the trace event. | |
21 | * </p> | |
c8422608 | 22 | * |
df0b8ff4 BH |
23 | * @version 1.0 |
24 | * @author Bernd Hufmann | |
73005152 | 25 | */ |
73005152 BH |
26 | public class TmfAsyncMessage extends AsyncMessage implements ITmfAsyncSequenceDiagramEvent { |
27 | ||
28 | // ------------------------------------------------------------------------ | |
29 | // Attributes | |
30 | // ------------------------------------------------------------------------ | |
df0b8ff4 BH |
31 | /** |
32 | * A asynchronous sequence diagram event implementation | |
33 | */ | |
73005152 | 34 | protected ITmfAsyncSequenceDiagramEvent fSdEvent; |
c8422608 | 35 | |
73005152 BH |
36 | // ------------------------------------------------------------------------ |
37 | // Constructors | |
38 | // ------------------------------------------------------------------------ | |
df0b8ff4 BH |
39 | /** |
40 | * Standard constructor | |
c8422608 | 41 | * |
df0b8ff4 BH |
42 | * @param sdEvent The asynchronous sequence diagram event implementation |
43 | * @param eventOccurrence The event index | |
44 | */ | |
73005152 BH |
45 | public TmfAsyncMessage(ITmfAsyncSequenceDiagramEvent sdEvent, int eventOccurrence) { |
46 | this.fSdEvent = sdEvent; | |
47 | setEventOccurrence(eventOccurrence); | |
48 | setName(sdEvent.getName()); | |
49 | setStartTime(sdEvent.getStartTime()); | |
50 | setEndTime(sdEvent.getEndTime()); | |
51 | } | |
52 | ||
53 | // ------------------------------------------------------------------------ | |
df0b8ff4 | 54 | // Methods |
73005152 BH |
55 | // ------------------------------------------------------------------------ |
56 | ||
57 | /* | |
58 | * (non-Javadoc) | |
59 | * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getSender() | |
60 | */ | |
61 | @Override | |
62 | public String getSender() { | |
63 | return fSdEvent.getSender(); | |
64 | } | |
65 | ||
66 | /* | |
67 | * (non-Javadoc) | |
68 | * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getReceiver() | |
69 | */ | |
70 | @Override | |
71 | public String getReceiver() { | |
72 | return fSdEvent.getReceiver(); | |
73 | } | |
74 | } |