Commit | Line | Data |
---|---|---|
73005152 BH |
1 | /********************************************************************** |
2 | * Copyright (c) 2011 Ericsson | |
6256d8ad | 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 | |
6256d8ad AM |
8 | * |
9 | * Contributors: | |
73005152 BH |
10 | * Bernd Hufmann - Initial API and implementation |
11 | **********************************************************************/ | |
6c13869b | 12 | package org.eclipse.linuxtools.tmf.core.uml2sd; |
73005152 | 13 | |
58b21093 | 14 | import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; |
4df4581d | 15 | import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp; |
73005152 BH |
16 | |
17 | /** | |
73005152 | 18 | * <p> |
df0b8ff4 | 19 | * A basic implementation of ITmfAsyncSequenceDiagramEvent. |
73005152 | 20 | * </p> |
6256d8ad | 21 | * |
df0b8ff4 BH |
22 | * @version 1.0 |
23 | * @author Bernd Hufmann | |
73005152 BH |
24 | */ |
25 | public class TmfAsyncSequenceDiagramEvent extends TmfSyncSequenceDiagramEvent implements ITmfAsyncSequenceDiagramEvent { | |
26 | ||
27 | // ------------------------------------------------------------------------ | |
28 | // Attributes | |
29 | // ------------------------------------------------------------------------ | |
df0b8ff4 BH |
30 | /** |
31 | * The end time of the sequence diagram event (i.e. time when signal was received). | |
32 | */ | |
4df4581d | 33 | final protected ITmfTimestamp fEndTime; |
6256d8ad | 34 | |
73005152 BH |
35 | // ------------------------------------------------------------------------ |
36 | // Constructors | |
df0b8ff4 BH |
37 | // ------------------------------------------------------------------------ |
38 | /** | |
39 | * Constructor | |
6256d8ad | 40 | * |
df0b8ff4 BH |
41 | * @param startEvent The start event (on sender side). |
42 | * @param endEvent The end event (receiver side). | |
43 | * @param sender The name of sender of signal. | |
44 | * @param receiver The Name of receiver of signal. | |
45 | * @param name - The signal name | |
46 | */ | |
58b21093 | 47 | public TmfAsyncSequenceDiagramEvent(ITmfEvent startEvent, ITmfEvent endEvent, String sender, String receiver, String name) { |
73005152 | 48 | super(startEvent, sender, receiver, name); |
6256d8ad | 49 | |
73005152 BH |
50 | if (endEvent == null) { |
51 | throw new IllegalArgumentException("TmfAsyncSequenceDiagramEvent constructor: endEvent=null"); //$NON-NLS-1$ | |
52 | } | |
4593bd5b | 53 | fEndTime = endEvent.getTimestamp(); |
73005152 BH |
54 | } |
55 | ||
56 | // ------------------------------------------------------------------------ | |
57 | // Operations | |
6256d8ad | 58 | // ------------------------------------------------------------------------ |
73005152 BH |
59 | |
60 | /* | |
61 | * (non-Javadoc) | |
df0b8ff4 | 62 | * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfAsyncSequenceDiagramEvent#getEndTime() |
73005152 BH |
63 | */ |
64 | @Override | |
4df4581d | 65 | public ITmfTimestamp getEndTime() { |
73005152 BH |
66 | return fEndTime; |
67 | } | |
68 | } |