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