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
.tracecompass
.tmf
.core
.event
;
15 import org
.eclipse
.core
.runtime
.IAdaptable
;
16 import org
.eclipse
.jdt
.annotation
.NonNull
;
17 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.ITmfTimestamp
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
21 * The generic event structure in TMF. In its canonical form, an event has:
24 * <li>a rank (order within the trace)
26 * <li>a source (reporting component)
28 * <li>a content (payload)
30 * For convenience, a free-form reference field is also provided. It could be
31 * used as e.g. a location marker (filename:lineno) to indicate where the event
35 * @author Francois Chouinard
42 public interface ITmfEvent
extends IAdaptable
{
44 // ------------------------------------------------------------------------
46 // ------------------------------------------------------------------------
49 * Pre-defined event timestamp attribute (for searching &filtering purposes)
51 public static final @NonNull String EVENT_FIELD_TIMESTAMP
= ":timestamp:"; //$NON-NLS-1$
54 * Pre-defined event source attribute (for searching &filtering purposes)
56 public static final @NonNull String EVENT_FIELD_SOURCE
= ":source:"; //$NON-NLS-1$
59 * Pre-defined event type attribute (for searching &filtering purposes)
61 public static final @NonNull String EVENT_FIELD_TYPE
= ":type:"; //$NON-NLS-1$
64 * Pre-defined event content attribute (for searching &filtering purposes)
66 public static final @NonNull String EVENT_FIELD_CONTENT
= ":content:"; //$NON-NLS-1$
69 * Pre-defined event reference attribute (for searching &filtering purposes)
71 public static final @NonNull String EVENT_FIELD_REFERENCE
= ":reference:"; //$NON-NLS-1$
73 // ------------------------------------------------------------------------
75 // ------------------------------------------------------------------------
78 * @return the trace that 'owns' the event
83 * @return the event rank within the parent trace
88 * @return the event timestamp
91 ITmfTimestamp
getTimestamp();
94 * @return the event source
99 * @return the event type
101 ITmfEventType
getType();
104 * @return the event content
106 ITmfEventField
getContent();
109 * @return the event reference
111 String
getReference();