1 /*******************************************************************************
2 * Copyright (c) 2009 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
.event
;
16 * <b><u>TmfEvent</u></b>
18 * The basic event structure in the TMF. In its canonical form, an event has:
20 * <li> a normalized timestamp
21 * <li> a source (reporter)
25 * For convenience, a free-form reference field is also provided. It could be
26 * used as e.g. a location marker in the event stream to distinguish between
27 * otherwise identical events.
29 public class TmfEvent
{
31 // ========================================================================
33 // ========================================================================
35 private final TmfTimestamp fEffectiveTimestamp
;
36 private final TmfTimestamp fOriginalTimestamp
;
37 private final TmfEventSource fSource
;
38 private final TmfEventType fType
;
39 private final TmfEventContent fContent
;
40 private final TmfEventReference fReference
;
42 // ========================================================================
44 // ========================================================================
53 public TmfEvent(TmfTimestamp originalTS
, TmfTimestamp effectiveTS
, TmfEventSource source
,
54 TmfEventType type
, TmfEventContent content
, TmfEventReference reference
)
56 fOriginalTimestamp
= originalTS
;
57 fEffectiveTimestamp
= effectiveTS
;
61 fReference
= reference
;
71 public TmfEvent(TmfTimestamp timestamp
, TmfEventSource source
,
72 TmfEventType type
, TmfEventContent content
, TmfEventReference reference
)
74 fOriginalTimestamp
= fEffectiveTimestamp
= timestamp
;
78 fReference
= reference
;
81 // ========================================================================
83 // ========================================================================
88 public TmfTimestamp
getTimestamp() {
89 return fEffectiveTimestamp
;
95 public TmfTimestamp
getOriginalTimestamp() {
96 return fOriginalTimestamp
;
102 public TmfEventSource
getSource() {
109 public TmfEventType
getType() {
116 public TmfEventContent
getContent() {
123 public TmfEventReference
getReference() {