Refactor TmfTrace and dependencies - finalize ITmfTraceIndexer
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / event / ITmfEvent.java
CommitLineData
5179fc01
FC
1/*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.tmf.core.event;
14
4c564a2d
FC
15import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
16
5179fc01
FC
17/**
18 * <b><u>ITmfEvent</u></b>
19 * <p>
3118edf1 20 * The basic event structure in TMF. In its canonical form, a data item has:
4c564a2d
FC
21 * <ul>
22 * <li> a parent trace
23 * <li> a rank (order within the trace)
24 * <li> a timestamp
25 * <li> a source (reporting component)
26 * <li> a type
27 * <li> a content (payload)
28 * </ul>
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
31 * was generated.
d337369a
FC
32 *
33 * @see ITmfTimestamp
34 * @see ITmfEventType
35 * @see ITmfEvetnField
36 * @see TmfEvent
4c564a2d
FC
37 */
38public interface ITmfEvent extends Cloneable {
39
a4115405
FC
40 // ------------------------------------------------------------------------
41 // Constants
42 // ------------------------------------------------------------------------
43
4c564a2d 44 /**
085d898f 45 * Pre-defined event attributes
4c564a2d 46 */
a4115405
FC
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$
52
53 // ------------------------------------------------------------------------
54 // Getters
55 // ------------------------------------------------------------------------
4c564a2d
FC
56
57 /**
58 * @return the trace that 'owns' the event
59 */
60 public ITmfTrace<?> getTrace();
61
62 /**
63 * @return the event rank within the parent trace
64 */
65 public long getRank();
5179fc01
FC
66
67 /**
68 * @return the event timestamp
69 */
70 public ITmfTimestamp getTimestamp();
71
4c564a2d
FC
72 /**
73 * @return the event source
74 */
75 public String getSource();
76
77 /**
78 * @return the event type
79 */
80 public ITmfEventType getType();
81
82 /**
83 * @return the event content
84 */
85 public ITmfEventField getContent();
86
87 /**
88 * @return the event reference
89 */
90 public String getReference();
91
a4115405
FC
92 // ------------------------------------------------------------------------
93 // Cloneable
94 // ------------------------------------------------------------------------
95
4c564a2d 96 /**
3ef62bac 97 * @return a clone of the event
4c564a2d
FC
98 */
99 public ITmfEvent clone();
085d898f 100
5179fc01 101}
This page took 0.029974 seconds and 5 git commands to generate.