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 * The generic event structure in TMF. In its canonical form, an event has:
21 * <li> a rank (order within the trace)
23 * <li> a source (reporting component)
25 * <li> a content (payload)
27 * For convenience, a free-form reference field is also provided. It could be
28 * used as e.g. a location marker (filename:lineno) to indicate where the event
33 * @author Francois Chouinard
40 public interface ITmfEvent
extends Cloneable
{
42 // ------------------------------------------------------------------------
44 // ------------------------------------------------------------------------
47 * Pre-defined event timestamp attribute (for searching &filtering purposes)
49 public static final String EVENT_FIELD_TIMESTAMP
= ":timestamp:"; //$NON-NLS-1$
52 * Pre-defined event source attribute (for searching &filtering purposes)
54 public static final String EVENT_FIELD_SOURCE
= ":source:"; //$NON-NLS-1$
57 * Pre-defined event type attribute (for searching &filtering purposes)
59 public static final String EVENT_FIELD_TYPE
= ":type:"; //$NON-NLS-1$
62 * Pre-defined event content attribute (for searching &filtering purposes)
64 public static final String EVENT_FIELD_CONTENT
= ":content:"; //$NON-NLS-1$
67 * Pre-defined event reference attribute (for searching &filtering purposes)
69 public static final String EVENT_FIELD_REFERENCE
= ":reference:"; //$NON-NLS-1$
71 // ------------------------------------------------------------------------
73 // ------------------------------------------------------------------------
76 * @return the trace that 'owns' the event
78 public ITmfTrace
<?
> getTrace();
81 * @return the event rank within the parent trace
83 public long getRank();
86 * @return the event timestamp
88 public ITmfTimestamp
getTimestamp();
91 * @return the event source
93 public String
getSource();
96 * @return the event type
98 public ITmfEventType
getType();
101 * @return the event content
103 public ITmfEventField
getContent();
106 * @return the event reference
108 public String
getReference();
110 // ------------------------------------------------------------------------
112 // ------------------------------------------------------------------------
115 * @return a clone of the event
117 public ITmfEvent
clone();