1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 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
.core
.runtime
.IAdaptable
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.timestamp
.ITmfTimestamp
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfTrace
;
20 * The generic event structure in TMF. In its canonical form, an event 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
34 * @author Francois Chouinard
41 public interface ITmfEvent
extends IAdaptable
{
43 // ------------------------------------------------------------------------
45 // ------------------------------------------------------------------------
48 * Pre-defined event timestamp attribute (for searching &filtering purposes)
50 public static final String EVENT_FIELD_TIMESTAMP
= ":timestamp:"; //$NON-NLS-1$
53 * Pre-defined event source attribute (for searching &filtering purposes)
55 public static final String EVENT_FIELD_SOURCE
= ":source:"; //$NON-NLS-1$
58 * Pre-defined event type attribute (for searching &filtering purposes)
60 public static final String EVENT_FIELD_TYPE
= ":type:"; //$NON-NLS-1$
63 * Pre-defined event content attribute (for searching &filtering purposes)
65 public static final String EVENT_FIELD_CONTENT
= ":content:"; //$NON-NLS-1$
68 * Pre-defined event reference attribute (for searching &filtering purposes)
70 public static final String EVENT_FIELD_REFERENCE
= ":reference:"; //$NON-NLS-1$
72 // ------------------------------------------------------------------------
74 // ------------------------------------------------------------------------
77 * @return the trace that 'owns' the event
82 * @return the event rank within the parent trace
87 * @return the event timestamp
90 ITmfTimestamp
getTimestamp();
93 * @return the event source
98 * @return the event type
100 ITmfEventType
getType();
103 * @return the event content
105 ITmfEventField
getContent();
108 * @return the event reference
110 String
getReference();