1 /*******************************************************************************
2 * Copyright (c) 2014, 2015 Ericsson
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
10 * Matthew Khouzam - Initial API and implementation
11 * Patrick Tasse - Rename reference to target
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.btf
.core
.event
;
16 import org
.eclipse
.core
.runtime
.Platform
;
17 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEventField
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfEventType
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.event
.TmfEvent
;
20 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.ITmfTimestamp
;
21 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
24 * A Btf event, basically a wrapper for the TmfEvent with the additional fields
25 * source, target and description.
27 * @author Matthew Khouzam
29 public class BtfEvent
extends TmfEvent
{
31 private final String fDescription
;
32 private final String fSource
;
33 private final String fTarget
;
36 * Standard constructor.
49 * a description of the type
51 * the event content (payload)
55 public BtfEvent(final ITmfTrace trace
,
57 final ITmfTimestamp timestamp
,
59 final ITmfEventType type
,
60 final String description
,
61 final ITmfEventField content
,
62 final String target
) {
63 super(trace
, rank
, timestamp
, type
, content
);
64 fDescription
= description
;
72 * @return the description
74 public String
getEventDescription() {
79 public Object
getAdapter(Class adapter
) {
80 // Force loading the adapters otherwise some plugins might not load
81 return Platform
.getAdapterManager().loadAdapter(this, adapter
.getName());
85 * Returns the source of this event.
87 * @return This event's source
89 public String
getSource() {
94 * Returns the target of this event.
96 * @return This event's target
98 public String
getTarget() {
This page took 0.035928 seconds and 5 git commands to generate.