1 /*******************************************************************************
2 * Copyright (c) 2012 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 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.event
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfTrace
;
18 * <b><u>ITmfEvent</u></b>
20 * The basic event structure in TMF. In its canonical form, a data item has:
23 * <li> a rank (order within the trace)
25 * <li> a source (reporting component)
27 * <li> a content (payload)
29 * For convenience, a free-form reference field is also provided. It could be
30 * used as e.g. a location marker (filename:lineno) to indicate where the event
38 public interface ITmfEvent
extends Cloneable
{
40 // ------------------------------------------------------------------------
42 // ------------------------------------------------------------------------
45 * Pre-defined event attributes
47 public static final String EVENT_FIELD_TIMESTAMP
= ":timestamp:"; //$NON-NLS-1$
48 public static final String EVENT_FIELD_SOURCE
= ":source:"; //$NON-NLS-1$
49 public static final String EVENT_FIELD_TYPE
= ":type:"; //$NON-NLS-1$
50 public static final String EVENT_FIELD_CONTENT
= ":content:"; //$NON-NLS-1$
51 public static final String EVENT_FIELD_REFERENCE
= ":reference:"; //$NON-NLS-1$
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
58 * @return the trace that 'owns' the event
60 public ITmfTrace
<?
> getTrace();
63 * @return the event rank within the parent trace
65 public long getRank();
68 * @return the event timestamp
70 public ITmfTimestamp
getTimestamp();
73 * @return the event source
75 public String
getSource();
78 * @return the event type
80 public ITmfEventType
getType();
83 * @return the event content
85 public ITmfEventField
getContent();
88 * @return the event reference
90 public String
getReference();
92 // ------------------------------------------------------------------------
94 // ------------------------------------------------------------------------
97 * @return a clone of the event
99 public ITmfEvent
clone();