Commit | Line | Data |
---|---|---|
550d787e FC |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009, 2010 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 | ||
6c13869b | 13 | package org.eclipse.linuxtools.tmf.core.component; |
8c8bf09f | 14 | |
72f1e62a | 15 | import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; |
6c13869b | 16 | import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest; |
c32744d6 | 17 | import org.eclipse.linuxtools.tmf.core.trace.ITmfContext; |
8c8bf09f | 18 | |
550d787e | 19 | /** |
8fd82db5 FC |
20 | * This is the interface of the data providers in TMF. Data providers have the |
21 | * capability of handling data requests. | |
22 | * | |
23 | * @version 1.0 | |
24 | * @author Francois Chouinard | |
25 | * | |
26 | * @see TmfDataProvider | |
27 | * @see TmfEventProvider | |
550d787e | 28 | */ |
f17b2f70 | 29 | public interface ITmfDataProvider<T extends ITmfEvent> extends ITmfComponent { |
8c8bf09f ASL |
30 | |
31 | /** | |
8fd82db5 | 32 | * Queue the request for processing. |
8c8bf09f | 33 | * |
f17b2f70 FC |
34 | * @param request The request to process |
35 | */ | |
36 | public void sendRequest(ITmfDataRequest<T> request); | |
8fd82db5 | 37 | |
f17b2f70 FC |
38 | public void fireRequest(); |
39 | public void notifyPendingRequest(boolean isIncrement); | |
c32744d6 FC |
40 | |
41 | /** | |
42 | * Return the next event based on the context supplied. The context | |
43 | * will be updated for the subsequent read. | |
44 | * | |
45 | * @param context the trace read context (updated) | |
46 | * @return the event referred to by context | |
47 | */ | |
48 | public T getNext(ITmfContext context); | |
8c8bf09f | 49 | } |