tmf: Remove deprecated HistoryTree constructor
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / statesystem / IStateChangeInput.java
CommitLineData
a52fde77
AM
1/*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
5df842b3 5 *
a52fde77
AM
6 * All rights reserved. This program and the accompanying materials are
7 * made available under the terms of the Eclipse Public License v1.0 which
8 * accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
5df842b3 10 *
a52fde77
AM
11 *******************************************************************************/
12
18ab1d18 13package org.eclipse.linuxtools.tmf.core.statesystem;
a52fde77 14
2c2f900e
AM
15import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
16import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
17
a52fde77
AM
18/**
19 * This is the interface used to define the "state change input", which is the
20 * main type of input that goes in the state system.
5df842b3 21 *
a52fde77
AM
22 * Usually a state change input, also called "state provider" is the piece of
23 * the pipeline which converts trace events to state changes.
5df842b3 24 *
79044a66 25 * @version 2.0
2cb26548 26 * @author Alexandre Montplaisir
a52fde77 27 */
2c2f900e 28public interface IStateChangeInput {
a52fde77 29
2c2f900e
AM
30 /**
31 * Get the trace with which this state input plugin is associated.
5df842b3 32 *
2c2f900e
AM
33 * @return The associated trace
34 */
2c2f900e 35 public ITmfTrace getTrace();
5df842b3 36
a52fde77
AM
37 /**
38 * Return the start time of this "state change input", which is normally the
39 * start time of the originating trace (or it can be the time of the first
40 * state-changing event).
5df842b3 41 *
a52fde77
AM
42 * @return The start time
43 */
44 public long getStartTime();
45
2c2f900e
AM
46 /**
47 * Method for the input plugin to specify which type of events it expects.
48 * This will guarantee that all events it receives via processEvent() are
49 * indeed of the given type, so it should be safe to cast to that type.
5df842b3 50 *
79044a66
AM
51 * @return The expected Class of the event. Only events of this class (and
52 * valid subclasses) will be handled.
53 * @since 2.0
2c2f900e 54 */
79044a66 55 public Class<? extends ITmfEvent> getExpectedEventType();
2c2f900e 56
a52fde77
AM
57 /**
58 * Assign the target state system where this SCI will insert its state
59 * changes. Because of dependencies issues, this can normally not be done at
60 * the constructor.
5df842b3 61 *
a52fde77 62 * This needs to be called before .run()!
5df842b3 63 *
d26f90fd 64 * @param ssb
5df842b3
AM
65 * Target state system for the state changes generated by this
66 * input plugin
f1f86dfb 67 * @since 2.0
a52fde77 68 */
f1f86dfb 69 public void assignTargetStateSystem(ITmfStateSystemBuilder ssb);
2c2f900e 70
7e634be6
AM
71 /**
72 * Return the currently assigned target state system.
73 *
74 * @return Reference to the currently assigned state system, or null if no
75 * SS is assigned yet
76 * @since 2.0
77 */
78 public ITmfStateSystem getAssignedStateSystem();
79
2c2f900e
AM
80 /**
81 * Send an event to this input plugin for processing. The implementation
82 * should check the contents, and call the state-modifying methods of its
83 * IStateSystemBuilder object accordingly.
5df842b3 84 *
2c2f900e
AM
85 * @param event
86 * The event (which should be safe to cast to the
87 * expectedEventType) that has to be processed.
88 */
89 public void processEvent(ITmfEvent event);
90
91 /**
92 * Indicate to the state history building process that we are done (for now),
93 * and that it should close its current history.
94 */
95 public void dispose();
a52fde77 96}
This page took 0.037965 seconds and 5 git commands to generate.